From bffbb455b110e8a12dc9f7e7d1159e47c43a1d16 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Wed, 28 Mar 2012 15:04:11 +0000 Subject: [PATCH] Theme Customizer: Fire WP_Customize->customize_preview_init on wp_loaded instead of template_redirect. props nacin, see #19910. Certain customize settings (such as show_on_front and other static front page features) need to be overridden before template_redirect. git-svn-id: http://svn.automattic.com/wordpress/trunk@20306 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index d2a69b3209..f708102b29 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -105,8 +105,8 @@ final class WP_Customize { public function wp_loaded() { do_action( 'customize_register' ); - if ( $this->is_preview() ) - add_action( 'template_redirect', array( $this, 'customize_preview_init' ) ); + if ( $this->is_preview() && ! is_admin() ) + $this->customize_preview_init(); } /**