Make AdSense Deluxe plugin work with WordPress 2.8.5
Recently I upgraded to WordPress 2.8.5. The upgrade process itself went smoothly but some of the plugins I have installed on my blog stopped working with latest WordPress version. One of them is AdSense Deluxe.I use AdSense units on my blog (as you can see) and use AdSense Deluxe plugin to manage my ads. The plugin was still displaying my AdSense units properly, the problem was that I could not access its admin panel to change settings or ad units. I was getting following error.
“You do not have sufficient permissions to access this page.”
It is a very handy plugin so I was very disappointed that is not compatible with WordPress 2.8.5. With no update available for this plugin I had to go into the plugin code to fix the problem.
Fortunately with a little research I was able to find and fix the problem.
Here is a step by step guide to make AdSense Deluxe work with WordPress 2.8.1 and beyond.
- Logon to your WordPress dashboard.
- Go to Plugins and then Installed.
- You will see a list of all the plugins you have installed on your blog.
- Locate the link for AdSense Deluxe plugin. Click on the ‘Edit’ link, located under plugin’s name.
- A text-editing box with plugin’s code will come up.
- Search for the phrase admin_head and then replace it with admin_menu.
- Here is the code before and after the change
Before the change:
if( function_exists('add_action') ){ add_action('admin_head', 'add_adsense_deluxe_menu'); add_action('wp_head', 'add_adsense_deluxe_handle_head'); }
After the change:
if( function_exists('add_action') ){ add_action('admin_menu', 'add_adsense_deluxe_menu'); add_action('wp_head', 'add_adsense_deluxe_handle_head'); }
I hope this post helps you in fixing your plugin issues.
Enjoy.!
Ricky
November 1, 2009 @ 5:09 am
Cool. Thanx for the share.I am still on wordpress 2.8.4. It will be helpful for me when my adsense gets approved
Carmen Bennett
November 12, 2009 @ 1:52 pm
Having same problem when I updated my WP blog version some plugins that I commonly used when I create blogs are not tested with the latest version and some wont even install.
Emmanuel Ajesin
May 8, 2010 @ 11:22 am
Thanks Zaheer, you really made my day… thanks for revealing this trick.