From e678aca6f42a19031aea66340fd3bb139c95b393 Mon Sep 17 00:00:00 2001 From: Daryl 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: https://develop.svn.wordpress.org/trunk@20251 602fd350-edb4-49c9-b593-d223f7449a82 --- 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' ) );