Created
November 7, 2012 11:37
-
-
Save mustardBees/4030980 to your computer and use it in GitHub Desktop.
Prevent WordPress Admin Toolbar from being hidden via the user profile edit screen
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
/** | |
* Prevent Toolbar from being hidden | |
* | |
* Hide the "Show Toolbar when viewing site" option on the profile page editor. | |
* | |
* @author: Don Fischer | |
* @link http://goo.gl/P5FTK | |
*/ | |
function iweb_hide_admin_bar_profile_option() { | |
echo '<style type="text/css">.show-admin-bar { display: none !important; }</style>'; | |
} | |
add_action( 'admin_print_styles-profile.php', 'iweb_hide_admin_bar_profile_option' ); | |
add_action( 'admin_print_styles-user-edit.php', 'iweb_hide_admin_bar_profile_option' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment