Allow turning off the admin bar via WP_SHOW_ADMIN_BAR constant, no_admin_bar() function, or show_admin_bar filter. see #14772

git-svn-id: https://develop.svn.wordpress.org/trunk@15834 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-10-18 17:58:36 +00:00
parent cdafd5fe89
commit 8b610e7c83
5 changed files with 33 additions and 6 deletions
+11
View File
@@ -4408,3 +4408,14 @@ function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = ar
return false;
}
/**
* Prevents the admin bar from being shown for the current screen.
*
* This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
*
* @since 3.1.0
*/
function no_admin_bar() {
define('WP_SHOW_ADMIN_BAR', false);
}