Ticket #7241: 7241.diff

File 7241.diff, 0.7 kB (added by DD32, 5 months ago)
  • wp-admin/includes/widgets.php

    old new  
    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"]) )