WordPress.org

Make WordPress Core

Changeset 20737


Ignore:
Timestamp:
05/07/12 20:03:39 (2 years ago)
Author:
koopersmith
Message:

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.

Location:
trunk/wp-includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize.php

    r20649 r20737  
    210210        ?> 
    211211        <script type="text/javascript"> 
    212             (function() { 
    213                 if ( typeof wp === 'undefined' || ! wp.customize ) 
    214                     return; 
    215  
    216                 wp.customize.settings = <?php echo json_encode( $settings ); ?>; 
    217             })(); 
     212            var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>; 
    218213        </script> 
    219214        <?php 
  • trunk/wp-includes/customize-controls.php

    r20645 r20737  
    116116    ?> 
    117117    <script type="text/javascript"> 
    118         (function() { 
    119             if ( typeof wp === 'undefined' || ! wp.customize ) 
    120                 return; 
    121  
    122             wp.customize.settings = <?php echo json_encode( $settings ); ?>; 
    123         })(); 
     118        var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>; 
    124119    </script> 
    125120</body> 
  • trunk/wp-includes/js/customize-controls.dev.js

    r20645 r20737  
    367367 
    368368    $( function() { 
     369        api.settings = window._wpCustomizeSettings; 
    369370        if ( ! api.settings ) 
    370371            return; 
  • trunk/wp-includes/js/customize-preview.dev.js

    r20598 r20737  
    3232 
    3333    $( function() { 
     34        api.settings = window._wpCustomizeSettings; 
    3435        if ( ! api.settings ) 
    3536            return; 
Note: See TracChangeset for help on using the changeset viewer.