From bfb690db09b4b990fac6fad9f8823b100bf09fce Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 24 Jul 2025 04:52:32 +0000 Subject: [PATCH] Customize: Account for existing query params in the admin URL when `wp_customize_url()` adds the `theme` query param. Query parameters may be inserted in the initial `customize.php` URL via the `admin_url` and `site_url` filters. Props xipasduarte, westonruter. Fixes #63632. Built from https://develop.svn.wordpress.org/trunk@60499 git-svn-id: http://core.svn.wordpress.org/trunk@59835 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 0727086aee..6287edef40 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -3771,7 +3771,7 @@ function _wp_customize_loader_settings() { function wp_customize_url( $stylesheet = '' ) { $url = admin_url( 'customize.php' ); if ( $stylesheet ) { - $url .= '?theme=' . urlencode( $stylesheet ); + $url = add_query_arg( 'theme', urlencode( $stylesheet ), $url ); } return esc_url( $url ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index da8b26e215..0c5a8cb082 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60498'; +$wp_version = '6.9-alpha-60499'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.