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:
parent
fbe317f406
commit
13628d9186
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -366,6 +366,7 @@
|
|||
};
|
||||
|
||||
$( function() {
|
||||
api.settings = window._wpCustomizeSettings;
|
||||
if ( ! api.settings )
|
||||
return;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
});
|
||||
|
||||
$( function() {
|
||||
api.settings = window._wpCustomizeSettings;
|
||||
if ( ! api.settings )
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue