From ab2697f8bf6a9e1d2e2eb842382e2405895e62a2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 2 Dec 2024 23:36:18 +0000 Subject: [PATCH] Customize: Begin HTML markup before Customizer script hooks. This prevents printing styles and scripts before the ``. 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. Built from https://develop.svn.wordpress.org/trunk@59480 git-svn-id: http://core.svn.wordpress.org/trunk@58866 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/customize.php | 12 ++++++------ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-admin/customize.php b/wp-admin/customize.php index 40857031a7..b27292d9eb 100644 --- a/wp-admin/customize.php +++ b/wp-admin/customize.php @@ -100,6 +100,12 @@ if ( ! empty( $autofocus ) ) { $wp_customize->set_autofocus( $autofocus ); } +// Let's roll. +header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); + +wp_user_settings(); +_wp_admin_html_begin(); + $registered = $wp_scripts->registered; $wp_scripts = new WP_Scripts(); $wp_scripts->registered = $registered; @@ -126,12 +132,6 @@ wp_enqueue_style( 'customize-controls' ); */ do_action( 'customize_controls_enqueue_scripts' ); -// Let's roll. -header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); - -wp_user_settings(); -_wp_admin_html_begin(); - $body_class = 'wp-core-ui wp-customizer js'; if ( wp_is_mobile() ) : diff --git a/wp-includes/version.php b/wp-includes/version.php index b60b68f349..19fa767e89 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59479'; +$wp_version = '6.8-alpha-59480'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.