mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Delete widgets when dragged back to Available Widgets, add ui.droppable.js and ui.selectable.js, see #9511
git-svn-id: https://develop.svn.wordpress.org/trunk@11445 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -21,12 +21,8 @@ function wp_list_widgets() {
|
||||
|
||||
$sort = $wp_registered_widgets;
|
||||
usort( $sort, create_function( '$a, $b', 'return strnatcasecmp( $a["name"], $b["name"] );' ) );
|
||||
$done = array(); ?>
|
||||
$done = array();
|
||||
|
||||
<div class="widget-holder">
|
||||
<p class="description"><?php _e('Drag widgets from here to a sidebar on the right to activate them.'); ?></p>
|
||||
<div id="widget-list">
|
||||
<?php
|
||||
foreach ( $sort as $widget ) {
|
||||
if ( in_array( $widget['callback'], $done, true ) ) // We already showed this multi-widget
|
||||
continue;
|
||||
@@ -52,11 +48,7 @@ function wp_list_widgets() {
|
||||
|
||||
$args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
|
||||
call_user_func_array( 'wp_widget_control', $args );
|
||||
} ?>
|
||||
</div>
|
||||
<br class='clear' />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user