From c05e46e4d1ce45450be82be712b35ecfca071eff Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 23 Dec 2014 17:04:47 +0000 Subject: [PATCH] Customizer: Improve IE 8 compatibility. * Use square bracket notation for `default` keywords. * Use Underscores `indexOf` for arrays. props westonruter, ocean90. fixes #30781 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@30991 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 4 ++-- src/wp-includes/class-wp-customize-control.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 880e5839a8..f43630a14a 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -128,12 +128,12 @@ api.utils.areElementListsEqual = function ( listA, listB ) { var equal = ( listA.length === listB.length && // if lists are different lengths, then naturally they are not equal - -1 === _.map( // are there any false values in the list returned by map? + -1 === _.indexOf( _.map( // are there any false values in the list returned by map? _.zip( listA, listB ), // pair up each element between the two lists function ( pair ) { return $( pair[0] ).is( pair[1] ); // compare to see if each pair are equal } - ).indexOf( false ) // check for presence of false in map's return value + ), false ) // check for presence of false in map's return value ); return equal; }; diff --git a/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php index 3c8a8bd9ce..950b0d5a34 100644 --- a/src/wp-includes/class-wp-customize-control.php +++ b/src/wp-includes/class-wp-customize-control.php @@ -738,7 +738,7 @@ class WP_Customize_Upload_Control extends WP_Customize_Control { */ public function content_template() { ?> -