mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Fix bad incrementor in widgets. Props mdawaffe. fixes #6350
git-svn-id: https://develop.svn.wordpress.org/trunk@7469 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -64,7 +64,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
|
||||
if ( $is_multi ) {
|
||||
// it's a multi-widget. We only need to show it in the list once.
|
||||
$already_shown[] = $widget['callback'];
|
||||
$num = array_pop( explode( '-', $widget['id'] ) );
|
||||
$num = (int) array_pop( explode( '-', $widget['id'] ) );
|
||||
$id_base = $wp_registered_widget_controls[$widget['id']]['id_base'];
|
||||
// so that we always add a new one when clicking "add"
|
||||
while ( isset($wp_registered_widgets["$id_base-$num"]) )
|
||||
|
||||
Reference in New Issue
Block a user