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:
parent
30f14afe10
commit
379393651b
|
@ -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] ) { #>
|
||||
|
|
Loading…
Reference in New Issue