From 98c3fef8f7856aeda591f0ec15691f534e8b4313 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Thu, 1 Mar 2012 00:14:51 +0000 Subject: [PATCH] Theme Customizer: Use wp_loaded for customize setting registration. see #19910. git-svn-id: https://develop.svn.wordpress.org/trunk@20058 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-customize.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index f8fc57ad14..3f161760a7 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -26,10 +26,7 @@ final class WP_Customize { add_action( 'setup_theme', array( $this, 'setup_theme' ) ); add_action( 'admin_init', array( $this, 'admin_init' ) ); - - // We register settings on init, so use a late priority to ensure we - // catch any theme settings added earlier on init (such as nav menus). - add_action( 'init', array( $this, 'init' ), 200 ); + add_action( 'wp_loaded', array( $this, 'wp_loaded' ) ); add_action( 'admin_footer', array( $this, 'admin_footer' ) ); add_action( 'customize_previewing', array( $this, 'customize_previewing' ) ); @@ -98,11 +95,11 @@ final class WP_Customize { } /** - * Register styles/scripts and Init the preview of each setting + * Register styles/scripts and initialize the preview of each setting * * @since 3.4.0 */ - public function init() { + public function wp_loaded() { do_action( 'customize_register' ); if ( ! $this->is_preview() )