Don't show multi widgets multi times in available widgets. Props mdawaffe. fixes #6162

git-svn-id: https://develop.svn.wordpress.org/trunk@7243 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-11 18:01:22 +00:00
parent 7b2b555aee
commit eda2d37158
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,8 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
$widget_control_template = ob_get_contents();
ob_end_clean();
if ( !$sidebar || $is_multi = false !== strpos( $widget_control_template, '%i%' ) ) {
$is_multi = false !== strpos( $widget_control_template, '%i%' );
if ( !$sidebar || $is_multi ) {
if ( $is_multi )
$already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once.
$action = 'add';