Theme Customizer: Load the preview iframe with the same scheme as the admin to prevent security warnings. props ocean90. fixes #20137, see #19910.

git-svn-id: https://develop.svn.wordpress.org/trunk@20051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-02-29 22:43:12 +00:00
parent a13ce71c43
commit c3249b5f7f
1 changed files with 3 additions and 1 deletions

View File

@ -80,8 +80,10 @@ do_action( 'customize_controls_print_scripts' );
do_action( 'customize_controls_print_footer_scripts' ); do_action( 'customize_controls_print_footer_scripts' );
// Check current scheme and load the preview with the same scheme
$scheme = is_ssl() ? 'https' : 'http';
$settings = array( $settings = array(
'preview' => esc_url( home_url( '/' ) ), 'preview' => esc_url( get_home_url( null, '/', $scheme ) ),
'values' => array(), 'values' => array(),
'prefix' => WP_Customize_Setting::name_prefix, 'prefix' => WP_Customize_Setting::name_prefix,
); );