Created
May 9, 2013 13:52
-
-
Save rezzz-dev/5547553 to your computer and use it in GitHub Desktop.
Snippet: WP: Disable Admin Bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Disable the Admin Bar & Setting in Profile. */ | |
add_filter( 'show_admin_bar', '__return_false' ); | |
function jr_hide_admin_bar_settings() { | |
?> | |
<style type="text/css"> | |
.show-admin-bar { | |
display: none; | |
} | |
</style> | |
<?php | |
} | |
function jr_disable_admin_bar() { | |
add_filter( 'show_admin_bar', '__return_false' ); | |
add_action( 'admin_print_scripts-profile.php', 'jr_hide_admin_bar_settings' ); | |
} | |
add_action( 'init', 'jr_disable_admin_bar' , 9 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment