From 76681c40e3e0ea4e88ba42c9f5820ab4aa3fead7 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sun, 25 Sep 2016 04:35:32 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@38649 git-svn-id: http://core.svn.wordpress.org/trunk@38592 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 15 ++------- wp-includes/js/customize-selective-refresh.js | 5 --- .../js/customize-selective-refresh.min.js | 2 +- wp-includes/theme.php | 33 ++++++++++++------- wp-includes/version.php | 2 +- 5 files changed, 26 insertions(+), 31 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index e56683da1b..bb892b564e 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -740,7 +740,6 @@ final class WP_Customize_Manager { wp_enqueue_script( 'customize-preview' ); add_action( 'wp', array( $this, 'customize_preview_override_404_status' ) ); add_action( 'wp_head', array( $this, 'customize_preview_base' ) ); - add_action( 'wp_head', array( $this, 'customize_preview_html5' ) ); add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) ); add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 ); add_action( 'shutdown', array( $this, 'customize_preview_signature' ), 1000 ); @@ -787,18 +786,10 @@ final class WP_Customize_Manager { * Print a workaround to handle HTML5 tags in IE < 9. * * @since 3.4.0 + * @deprecated 4.7.0 Customizer no longer supports IE8, so all supported browsers recognize HTML5. */ - public function customize_preview_html5() { ?> - - + b[c] = b[c].replace( rcs, ' ' ); + // The customizer requires postMessage and CORS (if the site is cross domain) + b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs; + }()); + +