This is a guide to manually modify the source code for the Starred Review plugin in order to resolve the recent “permissions” error that has shown up since upgrading to WordPress 2.8.1 and later.
You can modify the source code using the WordPress plugin editor on the left hand side of the dashboard or you can view/download the entire modified source code here and simply copy and paste into the editor if you wish. The file you’ll want to modify is starred-review.php. As far as editing code goes, it’s a relatively simple change, but before you edit anything, I recommend copying the original source code and having a backup, just in case something goes awry.
First, we’re going to change the code on line 12 from:
if (is_plugin_page()) {
$sr_dir = dirname(__FILE__).’/';
if (starredreview_installed())
$sr_page = $sr_dir.’sr_install.php’;
to
function sr_options_page() {
$sr_dir = dirname(__FILE__).’/';
if (starredreview_installed())
$sr_page = $sr_dir.’sr_install.php’;
Now, given that we’ve removed the if(is_plugin_page)) statement, we must also remove the corresponding else { statement around line 42, seen here:
<?php
} //end if install
require_once($sr_page);}
else {
function starredreview_installed(){
to
<?php
} //end if install
require_once($sr_page);}
function starredreview_installed(){
And now that we’ve removed the else { statement and opening bracket, we need to remove the proper closing bracket } and also add add_action(‘options_page_starred-review’, ‘sr_options_page’); around line 79 seen here:
} /* end fucntion: starred_review_badge */
add_action(‘init’, ‘starredreview_require’);
add_action(‘admin_menu’, ‘starredreview_admin_menu’);
}
to
} /* end fucntion: starred_review_badge */
add_action(‘options_page_starred-review’, ‘sr_options_page’);
add_action(‘init’, ‘starredreview_require’);
add_action(‘admin_menu’, ‘starredreview_admin_menu’);
That’s everything. Again, make sure that you make a backup copy of the plugin if you’re worried about making mistakes, or you can always just redownload the plugin from the directory if you mess up. If for some reason I missed a step, or it still doesn’t work, let me know and I’ll double check everything. Enjoy.