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.php

    r9018 r9028  
    1010require_once('admin.php');
    1111
    12 $action = -1;
    13 if ( isset($_GET['action2']) && $_GET['action2'] != -1 )
    14     $action = $_GET['action2'];
    15 if ( isset($_GET['action']) && $_GET['action'] != -1 )
    16     $action = $_GET['action'];
    17 
    1812// Handle bulk actions
    19 if ( $action != -1 ) {
    20     switch ( $action ) {
     13if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) {
     14    $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2'];
     15
     16    switch ( $doaction ) {
    2117        case 'delete':
    2218            if ( isset($_GET['post']) &&  (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) {
     
    4238                check_admin_referer('bulk-posts');
    4339                $_GET['post_status'] = $_GET['_status'];
    44    
     40
    4541                if ( -1 == $_GET['post_author'] )
    4642                    unset($_GET['post_author']);
    47    
     43
    4844                $done = bulk_edit_posts($_GET);
    4945            }
     
    5248
    5349    $sendback = wp_get_referer();
    54     if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('post-new.php');
    55     elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');
     50    if ( strpos($sendback, 'post.php') !== false ) $sendback = admin_url('post-new.php');
     51    elseif ( strpos($sendback, 'attachments.php') !== false ) $sendback = admin_url('attachments.php');
    5652    $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback);
    5753    if ( isset($done) ) {
     
    6359    wp_redirect($sendback);
    6460    exit();
    65 } elseif ( !empty($_GET['_wp_http_referer']) ) {
    66      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
     61} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
     62     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
    6763     exit;
    6864}
     
    115111<?php printf( __ngettext( '%d post updated.', '%d posts updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) );
    116112unset($_GET['upd']);
    117    
     113
    118114    if ( isset($_GET['skip']) && (int) $_GET['skip'] ) {
    119115        printf( __ngettext( ' %d post not updated. Somebody is editing it.', ' %d posts not updated. Somebody is editing them.', $_GET['skip'] ), number_format_i18n( $_GET['skip'] ) );
     
    133129        $post_status_label = $post_stati[$_GET['post_status']][1];
    134130    //TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php
    135     //if ( $post_listing_pageable && !is_archive() && !is_search() ) 
     131    //if ( $post_listing_pageable && !is_archive() && !is_search() )
    136132    //  $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
    137133    //else
     
    177173    sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
    178174}
    179 echo implode( ' |</li>', $status_links ) . '</li>';
     175echo implode( ' | </li>', $status_links ) . '</li>';
    180176unset( $status_links );
    181177endif;
     
    320316  </tr>
    321317</thead>
     318
     319<tfoot>
     320  <tr>
     321    <th scope="col"><?php _e('Comment') ?></th>
     322    <th scope="col"><?php _e('Author') ?></th>
     323    <th scope="col"><?php _e('Submitted') ?></th>
     324  </tr>
     325</tfoot>
     326
    322327<tbody id="the-comment-list" class="list:comment">
    323328<?php
Note: See TracChangeset for help on using the changeset viewer.