Archive for: November, 2010

SlidePress Plugin Redirect Bug

Nov 22 2010 Published by under PHP, Wordpress

When clicking on settings links for the SlidePress plugin in a multi-user WordPress site the plugin would redirect to /wp-admin/?c=1 for each domain except the parent site.

[code lang=”php”]function get_current_user_role() {
global $current_user, $wp_roles;
$role_names = $wp_roles -> get_names();
/* UPDATED 11/2/2010 9:21 AM
* by matt.thiessen@sourcemedia.net
*/
// modified [start]
reset($current_user->roles);
$first_key = key($current_user->roles);
return preg_replace( “/\|.*/”, ”, $role_names[$current_user->roles[$first_key]]);
/*old*///return preg_replace( “/\|.*/”, ”, $role_names[$current_user->roles[0]]);
// modified [end]
}[\code]

Also, make sure if you are an admin user with super user privileges you are added at a admin user to the site you are using the SlidePress plugin.

This will add proper capabilities to the database in the wp_usermeta table.
meta_key: wp_25_capabilities
meta_value: a:1:{s:13:”administrator”;s:1:”1″;}

No responses yet