Make WordPress Core


Ignore:
Timestamp:
11/21/2011 02:03:02 AM (14 years ago)
Author:
azaozz
Message:

Admin bar IE7, iPad and rtl refresh, see #81197

File:
1 edited

Legend:

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

    r19365 r19368  
    113113
    114114    public function render() {
     115        global $is_IE, $is_iphone;
    115116
    116117        $back_compat_parents = array(
    117118            'appearance' => 'site-name',
    118119        );
     120
     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        }
    119131
    120132        // Link nodes to parents.
     
    143155
    144156        ?>
    145         <div id="wpadminbar" class="nojq nojs">
     157        <div id="wpadminbar" class="<?php echo $class; ?>">
    146158            <div class="quicklinks">
    147159                <ul class="ab-top-menu"><?php
Note: See TracChangeset for help on using the changeset viewer.