WordPress.org

Make WordPress Core

Changeset 20051


Ignore:
Timestamp:
02/29/2012 10:43:12 PM (8 years ago)
Author:
koopersmith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/customize-controls.php

    r20043 r20051  
    8181    do_action( 'customize_controls_print_footer_scripts' );
    8282
     83    // Check current scheme and load the preview with the same scheme
     84    $scheme = is_ssl() ? 'https' : 'http';
    8385    $settings = array(
    84         'preview' => esc_url( home_url( '/' ) ),
     86        'preview' => esc_url( get_home_url( null, '/', $scheme ) ),
    8587        'values'  => array(),
    8688        'prefix'  => WP_Customize_Setting::name_prefix,
Note: See TracChangeset for help on using the changeset viewer.