Plugging Plugin Problems

I just installed the nicely designed Get Recent Comments plugin, but because I’m using WordPress 1.5.1.3 at the moment, I got the following error when trying to set the plugin’s options in the dashboard under Options > Recent Comments:

Fatal error: Cannot redeclare kjgrc_subpage_gravatar() in …/wp-content/plugins/get-recent-comments.php on line 23

 
Apparently I’m not the only one who’s experienced this problem. As it turns out, the problem comes about because of the way the developer tried to get around a double-loading issue when calling the function that loads the options page. Here’s the original approach near the beginning of get-recent-comments.php: if ( function_exists("is_plugin_page") && is_plugin_page() ) { kjgrc_options_page(); return; } A discussion here showed me a better way to accomplish the same thing for the newest WordPress; replace the above lines with the following: add_action('options_page_get-recent-comments', 'kjgrc_options_page'); And I can set the options with no error messages. Now all I need to do is start posting enough to actually get some comments. :)

Post a Comment

Your email is never shared. Required fields are marked *

*
*