Bail early in dynamic_sidebar() if there are no sidebars. fixes #14816.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
adcc961d69
commit
d9abef8ea3
|
@ -854,6 +854,8 @@ function dynamic_sidebar($index = 1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||||
|
if ( empty( $sidebars_widgets ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) )
|
if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) )
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue