Make WordPress Core

Changeset 59480


Ignore:
Timestamp:
12/02/2024 11:34:02 PM (8 weeks ago)
Author:
SergeyBiryukov
Message:

Customize: Begin HTML markup before Customizer script hooks.

This prevents printing styles and scripts before the <!DOCTYPE>.

The _wp_admin_html_begin() function should precede Customizer script hooks, in case a plugin prints markup inside a hook such as admin_enqueue_scripts.

Follow-up to [19995], [27907].

Props sabernhardt.
Fixes #62629.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/customize.php

    r58804 r59480  
    101101}
    102102
     103// Let's roll.
     104header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
     105
     106wp_user_settings();
     107_wp_admin_html_begin();
     108
    103109$registered             = $wp_scripts->registered;
    104110$wp_scripts             = new WP_Scripts();
     
    126132 */
    127133do_action( 'customize_controls_enqueue_scripts' );
    128 
    129 // Let's roll.
    130 header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
    131 
    132 wp_user_settings();
    133 _wp_admin_html_begin();
    134134
    135135$body_class = 'wp-core-ui wp-customizer js';
Note: See TracChangeset for help on using the changeset viewer.