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:
Andrew Ozz
2009-05-24 15:46:09 +00:00
parent 819f3b1046
commit f5fa5294ed
13 changed files with 156 additions and 50 deletions
+2 -10
View File
@@ -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
}
}
/**