Make WordPress Core

Ticket #7241: 7241.diff

File 7241.diff, 720 bytes (added by DD32, 18 years ago)
  • wp-admin/includes/widgets.php

     
    6464                                if ( 'all' == $show && $is_multi ) {
    6565                                        // it's a multi-widget.  We only need to show it in the list once.
    6666                                        $already_shown[] = $widget['callback'];
    67                                         $num = (int) array_pop( explode( '-', $widget['id'] ) );
     67                                        $num = (int) array_pop( $ids = explode( '-', $widget['id'] ) );
    6868                                        $id_base = $wp_registered_widget_controls[$widget['id']]['id_base'];
    6969                                        // so that we always add a new one when clicking "add"
    7070                                        while ( isset($wp_registered_widgets["$id_base-$num"]) )