mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +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:
@@ -62,7 +62,7 @@ function wp_admin_bar_render() {
|
||||
|
||||
if ( !is_object( $wp_admin_bar ) )
|
||||
return false;
|
||||
|
||||
|
||||
$wp_admin_bar->load_user_locale_translations();
|
||||
|
||||
do_action( 'wp_before_admin_bar_render' );
|
||||
@@ -226,7 +226,10 @@ add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 );
|
||||
* Load up the CSS needed to render the admin bar nice and pretty.
|
||||
*/
|
||||
function wp_admin_bar_css() {
|
||||
global $pagenow, $wp_locale;
|
||||
global $pagenow, $wp_locale, $wp_admin_bar;
|
||||
|
||||
if ( !is_object( $wp_admin_bar ) )
|
||||
return false;
|
||||
|
||||
if ( !is_user_logged_in() )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user