﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
10956	replacement is_active_sidebar - wp-includes/widgets.php	Frumph		"This uses the new sidebar global and allows for checking via name of the sidebar and the #

{{{
/**
 * function is_active_sidebar
 * check if a sidebar has widgets based on index number or name
 *
 * @param $index - sidebar name made with register_sidebar(array('name'=>'Name of Sidebar'), 
 * OR the index # as an int for specific sidebar.
 * @return true if sidebar with $index has widgets, false if not.
 * 
 */
function is_active_sidebar( $index ) {
	global $wp_registered_sidebars, $_wp_sidebars_widgets;
	if ( is_int($index) ) {
		if (!empty($_wp_sidebars_widgets[sanitize_title(""sidebar-$index"")]) )
			return true;
	} else {
		$i = 1;
		foreach ( $wp_registered_sidebars as $sidebar => $registered_sidebar ) {
			if ( $index == $registered_sidebar['name'] && !empty($_wp_sidebars_widgets[sanitize_title(""sidebar-$i"")]) )
				return true;
			$i++; 
		}
	}
	return false;
}
}}}"	enhancement	closed	normal		General	2.9	normal	wontfix	has-patch	
