WordPress.org

Make WordPress Core

Changeset 19390


Ignore:
Timestamp:
11/21/2011 11:07:54 PM (7 years ago)
Author:
koopersmith
Message:

Slight rearrangements in admin bar render logic. see #18197.

File:
1 edited

Legend:

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

    r19368 r19390  
    119119        );
    120120
    121         // have to do this here since admin bar shows on the front end too
    122         $class = 'nojq nojs';
    123         if ( $is_IE ) {
    124             if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') )
    125                 $class .= ' ie7';
    126             elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') )
    127                 $class .= ' ie8';
    128         } elseif ( $is_iphone ) {
    129             $class .= ' mobile';
    130         }
    131 
    132121        // Link nodes to parents.
    133122        foreach ( $this->nodes as $node ) {
     
    152141            else
    153142                $parent->children->primary[] = $node;
     143        }
     144
     145        // Add browser classes.
     146        // We have to do this here since admin bar shows on the front end.
     147        $class = 'nojq nojs';
     148        if ( $is_IE ) {
     149            if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) )
     150                $class .= ' ie7';
     151            elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) )
     152                $class .= ' ie8';
     153        } elseif ( $is_iphone ) {
     154            $class .= ' mobile';
    154155        }
    155156
Note: See TracChangeset for help on using the changeset viewer.