[wp-hackers] WP 3.1 admin bar
Kevin J Cristiano
kcristiano at gmail.com
Thu Feb 17 00:01:26 UTC 2011
I use this to get rid of the profile options and disable the admin bar.
You can add this to the functions.php or if you switch themes, just turn
it into a plug in.
/* Disable the Admin Bar. */
add_filter( 'show_admin_bar', '__return_false' );
/* Remove the Admin Bar preference in user profile */
remove_action( 'personal_options', '_admin_bar_preferences' );
On 2/16/2011 6:56 PM, Bill Dennen wrote:
>> Add add_action( 'show_admin_bar', '__return_false' ); to your functions.php
> I was looking for a way to disable it globally initially, but also
> allow users to enable it if they want it.
> Also, if I add that snippet to my functions.php file, users still see
> the option to toggle it in their personal options. So, this sets up a
> weird situation where we've disabled it globally, and users see an
> option to enable it in either the front or backend, yet it does
> Am I missing something obvious -- ie. a way to disable it and also
> remove those options from the user's profile?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers