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.

git-svn-id: https://develop.svn.wordpress.org/trunk@32086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-04-08 18:58:08 +00:00
parent 30f14afe10
commit 379393651b
1 changed files with 2 additions and 1 deletions

View File

@ -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 );
?>
<div class="theme" tabindex="0" data-preview-url="<?php echo esc_attr( $preview_url ); ?>" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name">
<# if ( data.theme.screenshot[0] ) { #>