Make WordPress Core


Ignore:
Timestamp:
10/23/2010 07:49:25 PM (15 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r15865 r15938  
    44324432        $old_value = $show_admin_bar;
    44334433        $show_admin_bar = $show;
     4434
     4435        // Prevent rendering if already initiated.
     4436        if ( ! $show_admin_bar && isset( $GLOBALS['wp_admin_bar'] ) )
     4437            $GLOBALS['wp_admin_bar'] = null;
     4438
    44344439        return $old_value;
    44354440    }
Note: See TracChangeset for help on using the changeset viewer.