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