Theme Customizer: Use a internal global _wpCustomizeSettings object for wp.customize.settings to prevent script race conditions in IE (which blocked interaction with the preview). see #20582, #19910.

git-svn-id: https://develop.svn.wordpress.org/trunk@20737 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-05-07 20:03:39 +00:00
parent 6e6fe46e2c
commit 7fde7c1904
4 changed files with 4 additions and 12 deletions

View File

@ -209,12 +209,7 @@ final class WP_Customize {
?>
<script type="text/javascript">
(function() {
if ( typeof wp === 'undefined' || ! wp.customize )
return;
wp.customize.settings = <?php echo json_encode( $settings ); ?>;
})();
var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>;
</script>
<?php
}

View File

@ -115,12 +115,7 @@ do_action( 'customize_controls_print_scripts' );
?>
<script type="text/javascript">
(function() {
if ( typeof wp === 'undefined' || ! wp.customize )
return;
wp.customize.settings = <?php echo json_encode( $settings ); ?>;
})();
var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>;
</script>
</body>
</html>

View File

@ -366,6 +366,7 @@
};
$( function() {
api.settings = window._wpCustomizeSettings;
if ( ! api.settings )
return;

View File

@ -31,6 +31,7 @@
});
$( function() {
api.settings = window._wpCustomizeSettings;
if ( ! api.settings )
return;