Mike1211 Posted August 3, 2007 Share Posted August 3, 2007 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] Quote Link to comment https://forums.phpfreaks.com/topic/63214-help-needed-changing-defaults-in-wordpress-plugin/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.