Make WordPress Core


Ignore:
Timestamp:
05/06/2020 08:13:38 PM (5 years ago)
Author:
ocean90
Message:

Administration: Remove any CSS related to Internet Explorer versions 6 – 10.

In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

  • Removes ie.css and ie style handle.
  • Removes IE specific class names and any related CSS.
  • Drops support for IE8 and older in wp_customize_support_script().
  • Updates compatibility mode for CSS minification to ie11.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r47573 r47771  
    33183318 * @since 3.4.0
    33193319 * @since 4.7.0 Support for IE8 and below is explicitly removed via conditional comments.
     3320 * @since 5.5.0 IE8 and older are no longer supported.
    33203321 */
    33213322function wp_customize_support_script() {
     
    33253326    $type_attr    = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"';
    33263327    ?>
    3327     <!--[if lte IE 8]>
    3328         <script<?php echo $type_attr; ?>>
    3329             document.body.className = document.body.className.replace( /(^|\s)(no-)?customize-support(?=\s|$)/, '' ) + ' no-customize-support';
    3330         </script>
    3331     <![endif]-->
    3332     <!--[if gte IE 9]><!-->
    3333         <script<?php echo $type_attr; ?>>
    3334             (function() {
    3335                 var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
    3336 
    3337         <?php   if ( $cross_domain ) : ?>
    3338                 request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
    3339         <?php   else : ?>
    3340                 request = true;
    3341         <?php   endif; ?>
    3342 
    3343                 b[c] = b[c].replace( rcs, ' ' );
    3344                 // The customizer requires postMessage and CORS (if the site is cross domain).
    3345                 b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
    3346             }());
    3347         </script>
    3348     <!--<![endif]-->
     3328    <script<?php echo $type_attr; ?>>
     3329        (function() {
     3330            var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
     3331
     3332    <?php   if ( $cross_domain ) : ?>
     3333            request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
     3334    <?php   else : ?>
     3335            request = true;
     3336    <?php   endif; ?>
     3337
     3338            b[c] = b[c].replace( rcs, ' ' );
     3339            // The customizer requires postMessage and CORS (if the site is cross domain).
     3340            b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
     3341        }());
     3342    </script>
    33493343    <?php
    33503344}
Note: See TracChangeset for help on using the changeset viewer.