From dee0600251674e960d45cbd3823bedbf32fd3733 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Thu, 22 Mar 2012 02:58:07 +0000 Subject: [PATCH] Theme Customizer: If a section has no settings, prevent it from being rendered. see #19910. git-svn-id: http://svn.automattic.com/wordpress/trunk@20251 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize.php b/wp-includes/class-wp-customize.php index 3129a27d5b..60dd9cc659 100644 --- a/wp-includes/class-wp-customize.php +++ b/wp-includes/class-wp-customize.php @@ -473,7 +473,7 @@ final class WP_Customize { $sections = array(); foreach ( $this->sections as $section ) { - if ( ! $section->check_capabilities() ) + if ( ! $section->check_capabilities() || ! $section->settings ) continue; usort( $section->settings, array( $this, '_cmp_priority' ) );