Fix widgets using old-style multi instance support. Props mdawaffe. fixes #6023

git-svn-id: https://develop.svn.wordpress.org/trunk@7080 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-02-28 00:31:46 +00:00
parent 530f74b6d5
commit 2b5f9d6440
2 changed files with 9 additions and 5 deletions
+5 -3
View File
@@ -41,7 +41,8 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
continue;
}
$sidebar = is_active_widget( $widget['callback'] );
$sidebar = is_active_widget( $widget['callback'], $widget['id'] );
if ( ( 'unused' == $show && $sidebar ) || ( 'used' == $show && !$sidebar ) )
continue;
@@ -50,8 +51,9 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
$widget_control_template = ob_get_contents();
ob_end_clean();
if ( !$sidebar || false !== strpos( $widget_control_template, '%i%' ) ) {
$already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once.
if ( !$sidebar || $is_multi = false !== strpos( $widget_control_template, '%i%' ) ) {
if ( $is_multi )
$already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once.
$action = 'add';
$add_url = wp_nonce_url( add_query_arg( array(
'sidebar' => $sidebar,