From 489db97ea3266c739a157d84c42492051b1a0b3a Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 12 Jun 2015 22:54:25 +0000 Subject: [PATCH] Customizer: Allow sections and panels to be exported to JS. Also fix param docs for `customize_dynamic_setting_class` filter, and use `require_once` for `class-wp-customize-manager.php` in bootstrap function `_wp_customize_include()`. See #30737, #32576. Built from https://develop.svn.wordpress.org/trunk@32744 git-svn-id: http://core.svn.wordpress.org/trunk@32715 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 6 +++--- wp-includes/theme.php | 5 ++--- wp-includes/version.php | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 47c0407f56..1d13c043c8 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -909,7 +909,7 @@ final class WP_Customize_Manager { * * @param string $setting_class WP_Customize_Setting or a subclass. * @param string $setting_id ID for dynamic setting, usually coming from `$_POST['customized']`. - * @param string $setting_args WP_Customize_Setting or a subclass. + * @param array $setting_args WP_Customize_Setting or a subclass. */ $setting_class = apply_filters( 'customize_dynamic_setting_class', $setting_class, $setting_id, $setting_args ); @@ -1205,7 +1205,7 @@ final class WP_Customize_Manager { $sections = array(); foreach ( $this->sections as $section ) { - if ( ! $section->check_capabilities() || ! $section->controls ) { + if ( ! $section->check_capabilities() ) { continue; } @@ -1228,7 +1228,7 @@ final class WP_Customize_Manager { $panels = array(); foreach ( $this->panels as $panel ) { - if ( ! $panel->check_capabilities() || ! $panel->sections ) { + if ( ! $panel->check_capabilities() ) { continue; } diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 998fbcfabf..691546075b 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1992,9 +1992,8 @@ function _wp_customize_include() { ) ) return; - require( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); - // Init Customize class - $GLOBALS['wp_customize'] = new WP_Customize_Manager; + require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; + $GLOBALS['wp_customize'] = new WP_Customize_Manager(); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 9e80e6fde4..b804b8ebc5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32743'; +$wp_version = '4.3-alpha-32744'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.