Fix notices when an in-use widget is deleted. See #9393 props nbachiyski
git-svn-id: http://svn.automattic.com/wordpress/trunk@11229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
99c157dbaf
commit
792271cc4b
|
@ -769,6 +769,9 @@ function dynamic_sidebar($index = 1) {
|
|||
|
||||
$did_one = false;
|
||||
foreach ( (array) $sidebars_widgets[$index] as $id ) {
|
||||
|
||||
if ( !isset($wp_registered_widgets[$id]) ) continue;
|
||||
|
||||
$params = array_merge(
|
||||
array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ),
|
||||
(array) $wp_registered_widgets[$id]['params']
|
||||
|
|
Loading…
Reference in New Issue