﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
22116	bug in dynamic_sidebar function	alexvorn2		"In the dynamic_sidebar function is for displaying the right sidebar, by id, but in the code it is searched by name:


{{{
function dynamic_sidebar($index = 1) {
	global $wp_registered_sidebars, $wp_registered_widgets;

	if ( is_int($index) ) {
		$index = ""sidebar-$index"";
	} else {
		$index = sanitize_title($index);
		foreach ( (array) $wp_registered_sidebars as $key => $value ) {
			if ( sanitize_title($value['name']) == $index ) {
				$index = $key;
				break;
			}
		}
	}


}}}

must be changed to :

{{{

function dynamic_sidebar($index = 1) {
	global $wp_registered_sidebars, $wp_registered_widgets;

	if ( is_int($index) ) {
		$index = ""sidebar-$index"";
	} else {
		$index = sanitize_title($index);
		foreach ( (array) $wp_registered_sidebars as $key => $value ) {
			if ( sanitize_title($value['id']) == $index ) {
				$index = $key;
				break;
			}
		}
	}
}}}

"	defect (bug)	new	normal	Future Release	Widgets	3.4.2	normal		has-patch	
