Skip to content

Instantly share code, notes, and snippets.

@iagdotme
Last active December 22, 2015 05:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save iagdotme/6421380 to your computer and use it in GitHub Desktop.
Disable WP Admin Bar
<?php
/* Disable the Admin Bar. */
// From: http://yoast.com/disable-wp-admin-bar/
add_filter( 'show_admin_bar', '__return_false' );
function sp_hide_admin_bar_settings()
{
?><style type="text/css">.show-admin-bar {display: none;}</style><?php
}
function sp_disable_admin_bar() {
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'admin_print_scripts-profile.php',
'sp_hide_admin_bar_settings' );
}
add_action( 'init', 'sp_disable_admin_bar' , 9 );
/* ------------------------------------------------------------------ */
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment