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/edit-link-categories.php

    r9016 r9028  
    1313if ( isset($_GET['action']) && isset($_GET['delete']) ) {
    1414    check_admin_referer('bulk-link-categories');
     15    $doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2'];
    1516
    1617    if ( !current_user_can('manage_categories') )
    1718        wp_die(__('Cheatin’ uh?'));
    18    
    19     if ( $_GET['action'] == 'delete' ) {
     19
     20    if ( 'delete' == $doaction ) {
    2021        foreach( (array) $_GET['delete'] as $cat_ID ) {
    2122            $cat_name = get_term_field('name', $cat_ID, 'link_category');
     
    3940        exit();
    4041    }
    41 } elseif ( !empty($_GET['_wp_http_referer']) ) {
    42      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
     42} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
     43     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
    4344     exit;
    4445}
     
    121122    </tr>
    122123    </thead>
     124
     125    <tfoot>
     126    <tr>
     127<?php print_column_headers('link-category', false); ?>
     128    </tr>
     129    </tfoot>
     130
    123131    <tbody id="the-list" class="list:link-cat">
    124132<?php
     
    144152</table>
    145153
    146 </form>
    147 
    148154<div class="tablenav">
    149 
    150155<?php
    151156if ( $page_links )
    152157    echo "<div class='tablenav-pages'>$page_links</div>";
    153158?>
     159
     160<div class="alignleft">
     161<select name="action2">
     162<option value="" selected><?php _e('Actions'); ?></option>
     163<option value="delete"><?php _e('Delete'); ?></option>
     164</select>
     165<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
     166</div>
     167
    154168<br class="clear" />
    155169</div>
    156170<br class="clear" />
     171</form>
    157172
    158173</div>
Note: See TracChangeset for help on using the changeset viewer.