Make WordPress Core

Changeset 20306


Ignore:
Timestamp:
03/28/2012 03:04:11 PM (13 years ago)
Author:
koopersmith
Message:

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.

File:
1 edited

Legend:

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

    r20303 r20306  
    106106        do_action( 'customize_register' );
    107107
    108         if ( $this->is_preview() )
    109             add_action( 'template_redirect', array( $this, 'customize_preview_init' ) );
     108        if ( $this->is_preview() && ! is_admin() )
     109            $this->customize_preview_init();
    110110    }
    111111
Note: See TracChangeset for help on using the changeset viewer.