Make WordPress Core


Ignore:
Timestamp:
09/29/2008 09:26:21 AM (16 years ago)
Author:
azaozz
Message:

Add table footers and action selects at the bottom

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/link-manager.php

    r9018 r9028  
    1111
    1212// Handle bulk deletes
    13 if ( isset($_GET['action']) && isset($_GET['linkcheck']) && isset($_GET['doaction']) ) {
     13if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) {
    1414    check_admin_referer('bulk-bookmarks');
     15    $doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2'];
    1516
    1617    if ( ! current_user_can('manage_links') )
    1718        wp_die( __('You do not have sufficient permissions to edit the links for this blog.') );
    18    
    19     if ( $_GET['action'] == 'delete' ) {
    20         foreach ( (array) $_GET['linkcheck'] as $link_id) {
     19
     20    if ( 'delete' == $doaction ) {
     21        foreach ( (array) $_GET['linkcheck'] as $link_id ) {
    2122            $link_id = (int) $link_id;
    2223
     
    2930        exit;
    3031    }
    31 } elseif ( !empty($_GET['_wp_http_referer']) ) {
    32      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
     32} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
     33     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
    3334     exit;
    3435}
     
    3940wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
    4041
    41 if (empty ($cat_id))
     42if ( empty($cat_id) )
    4243    $cat_id = 'all';
    4344
    44 if (empty ($order_by))
     45if ( empty($order_by) )
    4546    $order_by = 'order_name';
    4647
     
    159160    </tr>
    160161    </thead>
     162
     163    <tfoot>
     164    <tr>
     165<?php print_column_headers('link', false); ?>
     166    </tr>
     167    </tfoot>
     168
    161169    <tbody>
    162170<?php
     
    249257<?php } ?>
    250258
     259<div class="tablenav">
     260
     261<div class="alignleft">
     262<select name="action2">
     263<option value="" selected><?php _e('Actions'); ?></option>
     264<option value="delete"><?php _e('Delete'); ?></option>
     265</select>
     266<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
     267</div>
     268
     269<br class="clear" />
     270</div>
     271
    251272</form>
    252273
    253274<div id="ajax-response"></div>
    254275
    255 <div class="tablenav">
    256 <br class="clear" />
    257 </div>
    258 
    259 
    260276</div>
    261277
Note: See TracChangeset for help on using the changeset viewer.