WordPress.org

Make WordPress Core

Changeset 16221


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

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r16177 r16221  
    1414define('DOING_AJAX', true);
    1515define('WP_ADMIN', true);
    16 define('WP_SHOW_ADMIN_BAR' , false);
    1716
    1817if ( ! isset( $_REQUEST['action'] ) )
  • trunk/wp-admin/media-upload.php

    r16061 r16221  
    1010 */
    1111
    12 define('WP_SHOW_ADMIN_BAR' , false);
     12define('IFRAME_REQUEST' , true);
    1313
    1414/** Load WordPress Administration Bootstrap */
  • trunk/wp-admin/plugin-install.php

    r16175 r16221  
    66 * @subpackage Administration
    77 */
     8// TODO route this pages via a specific iframe handler instead of the do_action below
     9if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
     10    define('IFRAME_REQUEST' , true);
    811
    912/** WordPress Administration Bootstrap */
  • trunk/wp-admin/press-this.php

    r16061 r16221  
    77 */
    88
    9 define('WP_SHOW_ADMIN_BAR' , false);
     9define('IFRAME_REQUEST' , true);
    1010
    1111/** WordPress Administration Bootstrap */
  • trunk/wp-admin/update.php

    r16012 r16221  
    77 */
    88
    9 define('WP_SHOW_ADMIN_BAR' , false);
     9define('IFRAME_REQUEST' , true);
    1010
    1111/** WordPress Administration Bootstrap */
  • trunk/wp-app.php

    r16072 r16221  
    1212 */
    1313define('APP_REQUEST', true);
    14 define('WP_SHOW_ADMIN_BAR' , false);
    1514
    1615/** Set up WordPress environment */
  • 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
  • trunk/xmlrpc.php

    r16149 r16221  
    1212 */
    1313define('XMLRPC_REQUEST', true);
    14 define('WP_SHOW_ADMIN_BAR' , false);
    1514
    1615// Some browser-embedded clients send cookies. We don't want them.
Note: See TracChangeset for help on using the changeset viewer.