mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user