Changes from branches/2.8/wp-admin/includes/widgets.php at r11576 to trunk/wp-admin/includes/widgets.php at r11516
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/widgets.php
r11576 r11516 98 98 function next_widget_id_number($id_base) { 99 99 global $wp_registered_widgets; 100 $number = 1; 101 102 foreach ( $wp_registered_widgets as $widget_id => $widget ) { 103 if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) ) 104 $number = max($number, $matches[1]); 105 } 106 $number++; 100 $number = 2; 101 102 while ( isset($wp_registered_widgets["$id_base-$number"]) ) 103 $number++; 107 104 108 105 return $number;
Note: See TracChangeset
for help on using the changeset viewer.