Function that’s causing the problem is WordPress function, and has nothing to do with the plugin. This function loads thickbox jQuery plugin, but the problem is that this function is added in WordPress 2.6. I will replace it with the code that works with WP 2.5 also, but in the meantime you can make a change yourself:
In gd-star-rating.php file, find the following line (should be line 1099 in 1.0.8 version of plugin):
if ($this->admin_plugin) add_thickbox();
And replace it with this:
if ($this->admin_plugin) {
wp_enqueue_script('thickbox');
wp_enqueue_style('thickbox');
}
This should solve the problem you have.
Milan
Hi Milan,
Thank you very much for your help. I made the change you suggested and I now get a different error:
Fatal error: Call to undefined function wp_enqueue_style() in /home/oyemag/public_html/wp-content/plugins/gd-star-rating/gd-star-rating.php on line 1101
Thank you again for your assistance!
Still the WP 2.5 problem, another function added in WP 2.6. Funny is that on all posts on this forum refering to this error recomendation is to install new version of WordPress. But, here is the solution that will work with WP 2.5:
Modify gd-star-rating:
Add this at line 718:
if ($this->admin_plugin && $this->wp_version < 26)
echo('<link rel="stylesheet" href="'.get_option('home').'/wp-includes/js/thickbox/thickbox.css" type="text/css" media="screen" />');
Then you need to change the block changed with previeus post, and replace:
if ($this->admin_plugin) {
wp_enqueue_script('thickbox');
wp_enqueue_style('thickbox');
}
with
if ($this->admin_plugin) {
if ($this->wp_version >= 26) add_thickbox();
else wp_enqueue_script("thickbox");
}
I have just tested this solution and it works with 2.5.1. It will be included with next update, and will be available tomorrow on SVN.
Regards,
Milan
Milan,
Thank you sir. You are a true professional. I will wait for the update tomorrow.
I haven’t upgraded to 2.6 due to some plugin incompatibility issues, but will probably upgrade to 2.7 at some point.
Actually, I just made the changes myself and they worked. Thanks again!
Great! Any more problems, I will be glad to help.
Also, SVN gets updated daily, so all the latest fixes and all the new stuff are there.