Title: [Plugin: WordPress Admin Bar] Role Manager support
Last modified: August 19, 2016

---

# [Plugin: WordPress Admin Bar] Role Manager support

 *  [JeanPaulH](https://wordpress.org/support/users/djr/)
 * (@djr)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-admin-bar-role-manager-support/)
 * 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/](http://wordpress.org/extend/plugins/wordpress-admin-bar/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [JeanPaulH](https://wordpress.org/support/users/djr/)
 * (@djr)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-admin-bar-role-manager-support/#post-813255)
 * 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;
       ```
   
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-wordpress-admin-bar-role-manager-support/#post-813490)
 * 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](https://wordpress.org/support/users/phattrance/)
 * (@phattrance)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-admin-bar-role-manager-support/#post-813522)
 * is it possible to add this only for a user? like the site admin and no other

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: WordPress Admin Bar] Role Manager support’ is closed to new 
replies.

 * 3 replies
 * 3 participants
 * Last reply from: [phattrance](https://wordpress.org/support/users/phattrance/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-wordpress-admin-bar-role-manager-support/#post-813522)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
