mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Don't show the admin bar in the plugin/theme installers. Inserts condition directly into iframe_header(). Allows show_admin_bar() to be called after init by unsetting wp_admin_bar, thus preventing render once those hooks are fired. see #14772.
git-svn-id: https://develop.svn.wordpress.org/trunk@15938 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4431,6 +4431,11 @@ function show_admin_bar( $show = null ) {
|
||||
} else {
|
||||
$old_value = $show_admin_bar;
|
||||
$show_admin_bar = $show;
|
||||
|
||||
// Prevent rendering if already initiated.
|
||||
if ( ! $show_admin_bar && isset( $GLOBALS['wp_admin_bar'] ) )
|
||||
$GLOBALS['wp_admin_bar'] = null;
|
||||
|
||||
return $old_value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user