WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/06/2010 09:41:03 AM (9 years ago)
Author:
westi
Message:

Remove WP_SHOW_ADMIN_BAR and go off existing and new defines on page type. See #15315

File:
1 edited

Legend:

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

    r16132 r16221  
    329329function is_admin_bar_showing() {
    330330    global $show_admin_bar;
     331   
     332    /* For all these types of request we never want an admin bar period */
     333    if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
     334        return false;
     335   
    331336    if ( ! isset( $show_admin_bar ) || null === $show_admin_bar ) {
    332         $show_admin_bar = true;
    333 
    334         if ( defined('WP_SHOW_ADMIN_BAR') )
    335             $show_admin_bar = (bool) WP_SHOW_ADMIN_BAR;
    336         else if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) )
     337        if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() ) ) {
    337338            $show_admin_bar = false;
     339        } else {
     340            $show_admin_bar = true;
     341        }
    338342    }
    339343
Note: See TracChangeset for help on using the changeset viewer.