Properly unset widget number when saving
git-svn-id: http://svn.automattic.com/wordpress/trunk@11240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
348654df25
commit
66fa9d7da3
|
@ -1327,8 +1327,12 @@ case 'save-widget' :
|
|||
if ( $number ) {
|
||||
// don't delete other instances of the same multi-widget
|
||||
foreach ( $sidebar as $_widget_id ) {
|
||||
if ( isset($wp_registered_widgets[$_widget_id]['params'][0]['number']) )
|
||||
unset($wp_registered_widgets[$_widget_id]['params'][0]['number']);
|
||||
$_widget = $wp_registered_widgets[$_widget_id];
|
||||
|
||||
if ( isset($_widget['params']) &&
|
||||
is_array($_widget['params'][0]) &&
|
||||
array_key_exists('number', $_widget['params'][0]) )
|
||||
unset($wp_registered_widgets[$_widget_id]['params'][0]['number']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue