is_active_sidebar() should use wp_get_sidebars_widgets(), props greenshady and Denis-de-Bernardy, fixes #10136
git-svn-id: http://svn.automattic.com/wordpress/trunk@11562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
00a9c29c6e
commit
cb0b89a71c
|
@ -935,7 +935,7 @@ function is_dynamic_sidebar() {
|
||||||
*/
|
*/
|
||||||
function is_active_sidebar( $index ) {
|
function is_active_sidebar( $index ) {
|
||||||
$index = ( is_int($index) ) ? "sidebar-$index" : sanitize_title($index);
|
$index = ( is_int($index) ) ? "sidebar-$index" : sanitize_title($index);
|
||||||
$sidebars_widgets = get_option( 'sidebars_widgets', array() );
|
$sidebars_widgets = wp_get_sidebars_widgets(false);
|
||||||
if ( isset($sidebars_widgets[$index]) && !empty($sidebars_widgets[$index]) )
|
if ( isset($sidebars_widgets[$index]) && !empty($sidebars_widgets[$index]) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue