diff --git a/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php index 9be8e75ae8..3f1455a824 100644 --- a/src/wp-includes/class-wp-customize-control.php +++ b/src/wp-includes/class-wp-customize-control.php @@ -1242,7 +1242,8 @@ class WP_Customize_Theme_Control extends WP_Customize_Control { * @access public */ public function content_template() { - $preview_url = site_url( add_query_arg( 'theme', '{{ data.theme.id }}' ) ); + $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); + $preview_url = add_query_arg( 'theme', '{{ data.theme.id }}', $current_url ); ?>
<# if ( data.theme.screenshot[0] ) { #>