mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Theme Customizer: Add CORS checks to the initial check for customize support. Prevents flash of customize links on large pages. see #20582, #19910.
Add wp_customize_support_script(), to quickly alter the body class based on whether customize is supported. git-svn-id: https://develop.svn.wordpress.org/trunk@20893 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -97,15 +97,10 @@ $admin_body_class .= ' no-customize-support';
|
||||
<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');
|
||||
<?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 = document.body.className.replace('no-customize-support','customize-support');
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
|
||||
<?php wp_customize_support_script(); ?>
|
||||
|
||||
<div id="wpwrap">
|
||||
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
||||
<div id="wpcontent">
|
||||
|
||||
Reference in New Issue
Block a user