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
This commit is contained in:
Weston Ruter
2025-07-24 04:52:32 +00:00
parent b322832f3b
commit bfb690db09
2 changed files with 2 additions and 2 deletions

View File

@@ -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 );
}

View File

@@ -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.