From f7fd1665aeaf01a19f7df20423fd663a10b7b7e7 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 8 Apr 2015 18:59:27 +0000 Subject: [PATCH] Customizer Theme Switcher: Fix preview URL for subfolder installs. Use `$_SERVER['HTTP_HOST']` and `$_SERVER['REQUEST_URI']` instead of `site_url()` and `$_SERVER['REQUEST_URI']`. fixes #31896. Built from https://develop.svn.wordpress.org/trunk@32086 git-svn-id: http://core.svn.wordpress.org/trunk@32065 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-control.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-customize-control.php b/wp-includes/class-wp-customize-control.php index 9be8e75ae8..3f1455a824 100644 --- a/wp-includes/class-wp-customize-control.php +++ b/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] ) { #> diff --git a/wp-includes/version.php b/wp-includes/version.php index 38b7d2e5aa..8d79d98810 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta4-32085'; +$wp_version = '4.2-beta4-32086'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.