Bail early in dynamic_sidebar() if there are no sidebars. fixes #14816.
git-svn-id: https://develop.svn.wordpress.org/trunk@17545 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5fc7b13692
commit
fd76a68a2d
@ -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
Block a user