[Plugin: Profiler] This fixes for WordPress 3.0
-
I’m new to the forum so if this post isn’t appropriate please forgive me.
It seems the update for this plugin won’t hit the shelves in time for peoples needs so here’s how I got mine to work for WP3.0. Data for “roles” or capabilities in WP3.0 is slightly different then how the plugin is coded. The plugin searches in wp_usermeta > wp_capabilities for certain data and can’t find a exact match so the user is never listed.Open profiler.php (the plugin file) and go to line 91. Place two forward slashes like this // in front of the line to keep that line from executing yet not deleting it. Line 91 should now look like this:
\\$roleslist = array('\'a:1:{s:13:\"administrator\";b:1;}\''=>$administrator, '\'a:1:{s:10:\"subscriber\";b:1;}\''=>$subscriber, '\'a:1:{s:6:\"author\";b:1;}\''=>$author, '\'a:1:{s:6:\"editor\";b:1;}\''=>$editor, '\'a:1:{s:11:\"contributor\";b:1;}\''=>$contributor, '\'a:0:{}\''=>$none);
Now add this new line just below it and save the file:
$roleslist = array('\'a:1:{s:13:\"administrator\";s:1:\"1\";}\''=>$administrator, '\'a:1:{s:10:\"subscriber\";s:1:\"1\";}\''=>$subscriber, '\'a:1:{s:6:\"author\";s:1:"1";}\''=>$author, '\'a:1:{s:6:\"editor\";s:1:\"1\";}\''=>$editor, '\'a:1:{s:11:\"contributor\";s:1:"1";}\''=>$contributor, '\'a:0:{}\''=>$none);
Now the Profiler plugin should be working for WP3.0
Keep in mind this is for WordPress 3.0. It will certainly break the plugin for lesser versions. And I haven’t tested with WordPress 3.0.1I hope this will be helpful to someone.
Lee
- The topic ‘[Plugin: Profiler] This fixes for WordPress 3.0’ is closed to new replies.