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

git-svn-id: http://svn.automattic.com/wordpress/trunk@20479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-04-16 14:59:09 +00:00
parent 2884dc969d
commit 3f148d4e8f
1 changed files with 10 additions and 1 deletions

View File

@ -93,7 +93,16 @@ if ( wp_is_mobile() )
?>
</head>
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
<script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js','js');
<?php
// If the customize loader is enqueued, then add the 'customize-support' class early.
// This prevents a flash of unstyled content.
if ( wp_script_is( 'customize-loader', 'queue' ) ) : ?>
if ( window.postMessage )
document.body.className += ' customize-support';
<?php endif; ?>
</script>
<div id="wpwrap">
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>