From e2a48b2abb0d6840a15d9dfbcc6049cc739e635a Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Wed, 29 Feb 2012 23:09:38 +0000 Subject: [PATCH] Theme Customizer: Use a late priority when registering customize settings to ensure we catch any theme settings added earlier on init (such as nav menus). see #19910. git-svn-id: https://develop.svn.wordpress.org/trunk@20055 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-customize.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index 11670d2f00..f8fc57ad14 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -26,7 +26,10 @@ final class WP_Customize { add_action( 'setup_theme', array( $this, 'setup_theme' ) ); add_action( 'admin_init', array( $this, 'admin_init' ) ); - add_action( 'init', array( $this, '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( 'admin_footer', array( $this, 'admin_footer' ) ); add_action( 'customize_previewing', array( $this, 'customize_previewing' ) );