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

git-svn-id: http://svn.automattic.com/wordpress/trunk@7243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-11 18:01:22 +00:00
parent 93f0add73b
commit a3395b364e
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';