Make WordPress Core


Ignore:
Timestamp:
09/25/2016 04:34:34 AM (7 years ago)
Author:
westonruter
Message:

Customize: Opt to disable IE8 support via conditional comments instead of using unreliable Array.prototype.indexOf feature detection.

Deprecate/remove WP_Customize_Manager::customize_preview_html5() and remove document.head polyfill, both of which were only in place for IE8 support.

Props ryankienstra, westonruter.
Fixes #38021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r38624 r38649  
    741741        add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) );
    742742        add_action( 'wp_head', array( $this, 'customize_preview_base' ) );
    743         add_action( 'wp_head', array( $this, 'customize_preview_html5' ) );
    744743        add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
    745744        add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 );
     
    788787     *
    789788     * @since 3.4.0
    790      */
    791     public function customize_preview_html5() { ?>
    792         <!--[if lt IE 9]>
    793         <script type="text/javascript">
    794             var e = [ 'abbr', 'article', 'aside', 'audio', 'canvas', 'datalist', 'details',
    795                 'figure', 'footer', 'header', 'hgroup', 'mark', 'menu', 'meter', 'nav',
    796                 'output', 'progress', 'section', 'time', 'video' ];
    797             for ( var i = 0; i < e.length; i++ ) {
    798                 document.createElement( e[i] );
    799             }
    800         </script>
    801         <![endif]--><?php
     789     * @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5.
     790     */
     791    public function customize_preview_html5() {
     792        _deprecated_function( __FUNCTION__, '4.7.0' );
    802793    }
    803794
Note: See TracChangeset for help on using the changeset viewer.