Make WordPress Core

Changeset 38468


Ignore:
Timestamp:
08/31/2016 03:21:04 PM (10 years ago)
Author:
wonderboymusic
Message:

General: revert [38467], wp_is_IE() should not exist.

See #37699.

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r38467 r38468  
    3131 */
    3232if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() &&
    33          ! ( wp_is_IE() && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) &&
     33         ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) &&
    3434         apply_filters( 'wp_editor_expand', true, $post_type ) ) {
    3535
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r38467 r38468  
    11881188         *
    11891189         * @global WP_Locale $wp_locale
     1190         * @global bool      $is_IE
    11901191         */
    11911192        public function html() {
     
    12271228                add_filter( 'mce_css', array( $this, 'add_editor_style' ) );
    12281229
    1229                 if ( wp_is_IE() ) {
     1230                if ( ! empty( $GLOBALS['is_IE'] ) ) {
    12301231                        @header( 'X-UA-Compatible: IE=edge' );
    12311232                }
  • trunk/src/wp-admin/includes/media.php

    r38467 r38468  
    17841784 * @global string $type
    17851785 * @global string $tab
     1786 * @global bool   $is_IE
    17861787 * @global bool   $is_opera
    17871788 *
     
    17891790 */
    17901791function media_upload_form( $errors = null ) {
    1791         global $type, $tab, $is_opera;
     1792        global $type, $tab, $is_IE, $is_opera;
    17921793
    17931794        if ( ! _device_can_upload() ) {
  • trunk/src/wp-admin/includes/template.php

    r38467 r38468  
    19461946}
    19471947
     1948/**
     1949 *
     1950 * @global bool $is_IE
     1951 */
    19481952function _wp_admin_html_begin() {
     1953        global $is_IE;
     1954
    19491955        $admin_html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
    19501956
    1951         if ( wp_is_IE() ) {
     1957        if ( $is_IE )
    19521958                @header('X-UA-Compatible: IE=edge');
    1953         }
    19541959
    19551960?>
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r38467 r38468  
    392392
    393393        /**
     394         *
     395         * @global bool $is_IE
    394396         * @param object $root
    395397         */
    396398        final protected function _render( $root ) {
     399                global $is_IE;
     400
    397401                // Add browser classes.
    398402                // We have to do this here since admin bar shows on the front end.
    399403                $class = 'nojq nojs';
    400                 if ( wp_is_IE() ) {
    401                         if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) ) {
     404                if ( $is_IE ) {
     405                        if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) )
    402406                                $class .= ' ie7';
    403                         } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) ) {
     407                        elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) )
    404408                                $class .= ' ie8';
    405                         } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) ) {
     409                        elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) )
    406410                                $class .= ' ie9';
    407                         }
    408411                } elseif ( wp_is_mobile() ) {
    409412                        $class .= ' mobile';
  • trunk/src/wp-includes/general-template.php

    r38467 r38468  
    29052905 * @global bool $is_safari
    29062906 * @global bool $is_chrome
     2907 * @global bool $is_IE
    29072908 *
    29082909 * @return bool
    29092910 */
    29102911function user_can_richedit() {
    2911         global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_edge;
     2912        global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
    29122913
    29132914        if ( !isset($wp_rich_edit) ) {
     
    29172918                        if ( $is_safari ) {
    29182919                                $wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
    2919                         } elseif ( $is_gecko || $is_chrome || wp_is_IE() || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
     2920                        } elseif ( $is_gecko || $is_chrome || $is_IE || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
    29202921                                $wp_rich_edit = true;
    29212922                        }
  • trunk/src/wp-includes/link-template.php

    r38467 r38468  
    28972897 *
    28982898 * @since 2.6.0
     2899 *
     2900 * @global bool          $is_IE      Whether the browser matches an Internet Explorer user agent.
    28992901 */
    29002902function get_shortcut_link() {
     2903        global $is_IE;
     2904
    29012905        $link = '';
    29022906
    2903         if ( wp_is_IE() ) {
     2907        if ( $is_IE ) {
    29042908                /*
    29052909                 * Return the old/shorter bookmarklet code for MSIE 8 and lower,
  • trunk/src/wp-includes/media-template.php

    r38467 r38468  
    134134 *
    135135 * @since 3.5.0
     136 *
     137 * @global bool $is_IE
    136138 */
    137139function wp_print_media_templates() {
     140        global $is_IE;
    138141        $class = 'media-modal wp-core-ui';
    139         if ( wp_is_IE() && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false ) {
     142        if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
    140143                $class .= ' ie7';
    141         }
    142144        ?>
    143145        <!--[if lte IE 8]>
  • trunk/src/wp-includes/vars.php

    r38467 r38468  
    140140        return $is_mobile;
    141141}
    142 
    143 /**
    144  * @since 4.7.0
    145  *
    146  * @global bool $is_IE Whether the current user agent is Internet Explorer
    147  *
    148  * @return bool Return the value of the $is_IE global.
    149  */
    150 function wp_is_IE() {
    151         global $is_IE;
    152         return $is_IE;
    153 }
Note: See TracChangeset for help on using the changeset viewer.