WordPress.org

Make WordPress Core

Changeset 15938


Ignore:
Timestamp:
10/23/2010 07:49:25 PM (9 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.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r15918 r15938  
    15301530 */
    15311531function iframe_header( $title = '', $limit_styles = false ) {
    1532 global $hook_suffix;
     1532    show_admin_bar( false );
     1533    global $hook_suffix;
    15331534?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    15341535<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
  • trunk/wp-includes/admin-bar.php

    r15916 r15938  
    6363    if ( !is_object( $wp_admin_bar ) )
    6464        return false;
    65        
     65
    6666    $wp_admin_bar->load_user_locale_translations();
    6767
     
    227227 */
    228228function wp_admin_bar_css() {
    229     global $pagenow, $wp_locale;
     229    global $pagenow, $wp_locale, $wp_admin_bar;
     230
     231    if ( !is_object( $wp_admin_bar ) )
     232        return false;
    230233
    231234    if ( !is_user_logged_in() )
  • 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.