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
This commit is contained in:
parent
545d62e5f0
commit
dee0600251
|
@ -473,7 +473,7 @@ final class WP_Customize {
|
||||||
$sections = array();
|
$sections = array();
|
||||||
|
|
||||||
foreach ( $this->sections as $section ) {
|
foreach ( $this->sections as $section ) {
|
||||||
if ( ! $section->check_capabilities() )
|
if ( ! $section->check_capabilities() || ! $section->settings )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
usort( $section->settings, array( $this, '_cmp_priority' ) );
|
usort( $section->settings, array( $this, '_cmp_priority' ) );
|
||||||
|
|
Loading…
Reference in New Issue