WordPress.org

Make WordPress Core

Changeset 17021


Ignore:
Timestamp:
12/17/10 08:34:36 (5 years ago)
Author:
westi
Message:

Ensure show_admin_bar( false ) works after init. Fixes #15856.

File:
1 edited

Legend:

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

    r17009 r17021  
    44854485    global $show_admin_bar; 
    44864486    $show_admin_bar = (bool) $show; 
     4487     
     4488    // Remove the object if we are not going to be showing 
     4489    // Otherwise you have to call this function prior to the init hook for it to work! 
     4490    if ( ! $show_admin_bar && isset( $GLOBALS['wp_admin_bar'] ) )         
     4491        $GLOBALS['wp_admin_bar'] = null;  
    44874492} 
    44884493 
Note: See TracChangeset for help on using the changeset viewer.