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: http://core.svn.wordpress.org/trunk@20737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-05-07 20:03:39 +00:00
parent fbe317f406
commit 13628d9186
4 changed files with 4 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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