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:
parent
7b2b555aee
commit
eda2d37158
|
@ -52,7 +52,8 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
|
||||||
$widget_control_template = ob_get_contents();
|
$widget_control_template = ob_get_contents();
|
||||||
ob_end_clean();
|
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 )
|
if ( $is_multi )
|
||||||
$already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once.
|
$already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once.
|
||||||
$action = 'add';
|
$action = 'add';
|
||||||
|
|
Loading…
Reference in New Issue