Jump to content

Help Needed Changing Defaults In Wordpress Plugin


Mike1211

Recommended Posts

Hi,

 

I'm working on mass installs of a wordpress plugin called Mighty Adsense

(see attached txt file).

 

The plugin lets you insert your adsense code into different sets then

displays the sets based on drop down menu options.

 

Currently, the default insertion text is:

 

Edit Options>MightyAdsense>Adsense Code]

 

I would like to change this and put my adsense code into the

plugin file so when I upload the plugin, the adsense ads already

appear.

 

Here's where I'm running into trouble. There are 10 different

code sets, and I need 3 different ads to display.

 

There doesn't appear to be a default insertion area for each

of the 10 sets. There's only 1 area to enter the default text.

 

The code says this:

 

// Setup defaults if options do not exist

for ($i=1;$i<11;$i++)

{

add_option('mightyadsense_code'.$i, '[#'.$i.': Edit Options>MightyAdsense>Adsense Code]');

add_option('mightyadsense_display'.$i, TRUE); 

add_option('mightyadsense_position'.$i, 'top-left');

 

I'm guessing the .$i.' pulls the different set numbers into the default text. Example:

(Code Set 3 Default text is: [#3: Edit Options>MightyAdsense>Adsense Code]

(Code Set 5 Default text is: [#5: Edit Options>MightyAdsense>Adsense Code]

 

So, if I have 3 different ads I want to put into 3 different

sets, I'd like to be able set defaults in the plugin file for

each set, not for all 10 sets.

 

 

Can anyone help?

 

Thanks,

Mike

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.