WordPress.org

Make WordPress Core

Changeset 20479


Ignore:
Timestamp:
04/16/12 14:59:09 (2 years ago)
Author:
koopersmith
Message:

Theme Customizer: If the customize loader is enqueued, then add the 'customize-support' class early. This prevents a flash of unstyled content. see #19910.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r20417 r20479  
    9494</head> 
    9595<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>"> 
    96 <script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script> 
     96<script type="text/javascript"> 
     97    document.body.className = document.body.className.replace('no-js','js'); 
     98<?php 
     99// If the customize loader is enqueued, then add the 'customize-support' class early. 
     100// This prevents a flash of unstyled content. 
     101if ( wp_script_is( 'customize-loader', 'queue' ) ) : ?> 
     102    if ( window.postMessage ) 
     103        document.body.className += ' customize-support'; 
     104<?php endif; ?> 
     105</script> 
    97106 
    98107<div id="wpwrap"> 
Note: See TracChangeset for help on using the changeset viewer.