WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/31/2016 06:41:07 AM (5 years ago)
Author:
wonderboymusic
Message:

General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.

See #37699.

File:
1 edited

Legend:

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

    r38035 r38467  
    392392
    393393    /**
    394      *
    395      * @global bool $is_IE
    396394     * @param object $root
    397395     */
    398396    final protected function _render( $root ) {
    399         global $is_IE;
    400 
    401397        // Add browser classes.
    402398        // We have to do this here since admin bar shows on the front end.
    403399        $class = 'nojq nojs';
    404         if ( $is_IE ) {
    405             if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) )
     400        if ( wp_is_IE() ) {
     401            if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) ) {
    406402                $class .= ' ie7';
    407             elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) )
     403            } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) ) {
    408404                $class .= ' ie8';
    409             elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) )
     405            } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) ) {
    410406                $class .= ' ie9';
     407            }
    411408        } elseif ( wp_is_mobile() ) {
    412409            $class .= ' mobile';
Note: See TracChangeset for help on using the changeset viewer.