[wp-testers] widget break from 2.7 to 2.8

Admin admin at activeblogging.com
Tue Jul 28 15:32:21 UTC 2009


Not sure if this has been reported before, by when I register 
multiple widgets that use the same callback, only the first one 
appears on the 'available widgets' list:

DOESN'T WORK
register_sidebar_widget("widget 1","callbackSame");
register_sidebar_widget("widget 2","callbackSame");

DOES WORK
register_sidebar_widget("widget 1","callbackSame");
register_sidebar_widget("widget 2","callbackAnother");

The problem is in wp_list_widgets()@includes/widgets.php, where the 
list is filtered for unique plugins, based on callback:
--------------
foreach ( $sort as $widget ) {
if ( in_array( $widget['callback'], $done, true ) )
continue;
--------------





More information about the wp-testers mailing list