WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/24/2009 03:46:09 PM (11 years ago)
Author:
azaozz
Message:

Delete widgets when dragged back to Available Widgets, add ui.droppable.js and ui.selectable.js, see #9511

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/widgets.php

    r11383 r11445  
    2222    $sort = $wp_registered_widgets;
    2323    usort( $sort, create_function( '$a, $b', 'return strnatcasecmp( $a["name"], $b["name"] );' ) );
    24     $done = array(); ?>
    25 
    26     <div class="widget-holder">
    27     <p class="description"><?php _e('Drag widgets from here to a sidebar on the right to activate them.'); ?></p>
    28     <div id="widget-list">
    29 <?php
     24    $done = array();
     25
    3026    foreach ( $sort as $widget ) {
    3127        if ( in_array( $widget['callback'], $done, true ) ) // We already showed this multi-widget
     
    5349        $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
    5450        call_user_func_array( 'wp_widget_control', $args );
    55     } ?>
    56     </div>
    57     <br class='clear' />
    58     </div>
    59 <?php
     51    }
    6052}
    6153
Note: See TracChangeset for help on using the changeset viewer.