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: https://develop.svn.wordpress.org/trunk@20306 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
abd47c9ff9
commit
b43e2dfba4
|
@ -105,8 +105,8 @@ final class WP_Customize {
|
||||||
public function wp_loaded() {
|
public function wp_loaded() {
|
||||||
do_action( 'customize_register' );
|
do_action( 'customize_register' );
|
||||||
|
|
||||||
if ( $this->is_preview() )
|
if ( $this->is_preview() && ! is_admin() )
|
||||||
add_action( 'template_redirect', array( $this, 'customize_preview_init' ) );
|
$this->customize_preview_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue