From f6882e94efc12a1e6880af00a9d397912e7a2678 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Thu, 24 May 2012 02:07:16 +0000 Subject: [PATCH] Theme Customizer: Add a base element to the preview's head element to allow relative links (root, hash, and query strings). see #20507, #19910. git-svn-id: http://core.svn.wordpress.org/trunk@20863 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 37ba2ddb55..86319753c1 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -254,6 +254,7 @@ final class WP_Customize_Manager { $this->prepare_controls(); wp_enqueue_script( 'customize-preview' ); + add_action( 'wp_head', array( $this, 'customize_preview_base' ) ); add_action( 'wp_footer', array( $this, 'customize_preview_settings' ), 20 ); foreach ( $this->settings as $setting ) { @@ -263,9 +264,17 @@ final class WP_Customize_Manager { do_action( 'customize_preview_init', $this ); } + /** + * Print base element for preview frame. + * + * @since 3.4.0 + */ + public function customize_preview_base() { + ?>