Ticket #6866: 6866.diff
| File 6866.diff, 1.6 KB (added by , 18 years ago) |
|---|
-
wp-includes/widgets.php
306 306 $_sidebars_widgets[$index][$i] = $id; 307 307 continue; 308 308 } 309 309 310 310 $found = false; 311 311 312 312 foreach ( $wp_registered_widgets as $widget_id => $widget ) { 313 313 if ( strtolower($widget['name']) == strtolower($name) ) { 314 314 $_sidebars_widgets[$index][$i] = $widget['id']; … … 320 320 break; 321 321 } 322 322 } 323 323 324 324 if ( $found ) 325 325 continue; 326 326 327 327 unset($_sidebars_widgets[$index][$i]); 328 328 } 329 329 $_sidebars_widgets['array_version'] = 2; … … 1496 1496 $options[$widget_number] = array( 'something' => $something ); // Even simple widgets should store stuff in array, rather than in scalar 1497 1497 } 1498 1498 1499 update_option('widget_ text', $options);1499 update_option('widget_many', $options); 1500 1500 1501 1501 $updated = true; // So that we don't go through this more than once 1502 1502 } … … 1538 1538 // $id should look like {$id_base}-{$o} 1539 1539 $id = "many-$o"; // Never never never translate an id 1540 1540 $registered = true; 1541 wp_register_sidebar_widget( $id, $name, 'w p_widget_text', $widget_ops, array( 'number' => $o ) );1542 wp_register_widget_control( $id, $name, 'w p_widget_text_control', $control_ops, array( 'number' => $o ) );1541 wp_register_sidebar_widget( $id, $name, 'widget_many', $widget_ops, array( 'number' => $o ) ); 1542 wp_register_widget_control( $id, $name, 'widget_many_control', $control_ops, array( 'number' => $o ) ); 1543 1543 } 1544 1544 1545 1545 // If there are none, we register the widget's existance with a generic template
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)