Hi Viper007Bond,
Would you be willing to implement Role Manager support in WordPress Admin Bar? As our blog has multiple editors and not everyone likes to have the Admin Bar, it would be great if this could be disabled with a role capability.
Thanks for considering.
http://wordpress.org/extend/plugins/wordpress-admin-bar/
This is my current code, but it probably breaks for other who haven't got Role Manager installed. The 'iPhone' part is to disable AB when viewing the blog on my iPhone :)
// Everything this plugin does is only for logged in users
$role = get_role('administrator');
if( !$role->has_cap('adminbar') ) {
$role->add_cap('adminbar');
}
if ( !current_user_can('adminbar') OR (preg_match('/iPhone/i', $_SERVER['HTTP_USER_AGENT'], $match)) ) return;
I don't see the need honestly.
It automatically adapts to each user's role to only display the menus they are allowed to see.
As for particular people not wanting to be able to see it, if they visit the options page for the plugin, they can disable it for their account. ;)
phattrance
Member
Posted 1 year ago #
is it possible to add this only for a user? like the site admin and no other