WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/25/2012 12:15:12 AM (8 years ago)
Author:
koopersmith
Message:

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.

File:
1 edited

Legend:

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

    r20845 r20893  
    9898<script type="text/javascript">
    9999    document.body.className = document.body.className.replace('no-js','js');
    100 <?php
    101 // If the customize loader is enqueued, then add the 'customize-support' class early.
    102 // This prevents a flash of unstyled content.
    103 if ( wp_script_is( 'customize-loader', 'queue' ) ) : ?>
    104     if ( window.postMessage )
    105         document.body.className = document.body.className.replace('no-customize-support','customize-support');
    106 <?php endif; ?>
    107100</script>
     101
     102<?php wp_customize_support_script(); ?>
    108103
    109104<div id="wpwrap">
Note: See TracChangeset for help on using the changeset viewer.