Changeset 9028

Show
Ignore:
Timestamp:
09/29/08 09:26:21 (2 months ago)
Author:
azaozz
Message:

Add table footers and action selects at the bottom

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-header.php

    r9025 r9028  
    8888} 
    8989?> 
    90 <img id="logo50" src="images/logo50.png" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1> 
     90<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1> 
    9191</div> 
    9292 
  • trunk/wp-admin/categories.php

    r9016 r9028  
    1212$title = __('Categories'); 
    1313 
    14 wp_reset_vars(array('action', 'cat')); 
    15  
    16 if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete']) ) 
     14wp_reset_vars( array('action', 'cat') ); 
     15 
     16if ( isset( $_GET['action'] ) && isset($_GET['delete']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) ) 
    1717    $action = 'bulk-delete'; 
    1818 
     
    103103default: 
    104104 
    105 if ( !empty($_GET['_wp_http_referer']) ) { 
    106      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     105if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 
     106     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 
    107107     exit; 
    108108} 
     
    184184    </tr> 
    185185    </thead> 
     186 
     187    <tfoot> 
     188    <tr> 
     189<?php print_column_headers('category', false); ?> 
     190    </tr> 
     191    </tfoot> 
     192 
    186193    <tbody id="the-list" class="list:cat"> 
    187194<?php 
     
    191198</table> 
    192199 
    193 </form> 
    194  
    195200<div class="tablenav"> 
    196  
    197201<?php 
    198202if ( $page_links ) 
    199203    echo "<div class='tablenav-pages'>$page_links</div>"; 
    200204?> 
    201 <br class="clear" /> 
    202 </div> 
    203 <br class="clear" /> 
     205 
     206<div class="alignleft"> 
     207<select name="action2"> 
     208<option value="" selected><?php _e('Actions'); ?></option> 
     209<option value="delete"><?php _e('Delete'); ?></option> 
     210</select> 
     211<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
     212<?php wp_nonce_field('bulk-categories'); ?> 
     213</div> 
     214 
     215<br class="clear" /> 
     216</div> 
     217 
     218<br class="clear" /> 
     219</form> 
    204220 
    205221</div> 
  • trunk/wp-admin/css/colors-classic.css

    r9018 r9028  
    322322 
    323323.widefat thead, 
     324.widefat tfoot, 
    324325.thead, 
     326.tfoot, 
     327h3.dashboard-widget-title, 
     328h3.dashboard-widget-title span, 
     329h3.dashboard-widget-title small, 
    325330.find-box-head { 
    326331    background-color: #464646; 
  • trunk/wp-admin/css/colors-fresh.css

    r9018 r9028  
    316316 
    317317.widefat thead, 
     318.widefat tfoot, 
    318319.thead, 
     320.tfoot, 
    319321h3.dashboard-widget-title, 
    320322h3.dashboard-widget-title span, 
  • trunk/wp-admin/edit-attachment-rows.php

    r8931 r9028  
    1515    </tr> 
    1616    </thead> 
     17     
     18    <tfoot> 
     19    <tr> 
     20<?php print_column_headers('media', false); ?> 
     21    </tr> 
     22    </tfoot> 
     23     
    1724    <tbody id="the-list" class="list:post"> 
    1825<?php 
  • trunk/wp-admin/edit-comments.php

    r9023 r9028  
    1717if ( isset( $_POST['delete_all_spam'] ) ) { 
    1818    check_admin_referer('bulk-spam-delete'); 
    19      
     19 
    2020    $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam'" ); 
    2121    wp_redirect('edit-comments.php?deleted=' . (int) $deleted_spam); 
    2222} 
    2323 
    24 if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) { 
     24if ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) { 
    2525    check_admin_referer('bulk-comments'); 
    26  
    27     $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; 
    28     foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each 
    29         $comment = (int) $comment; 
    30         $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment) ); 
     26    $doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2']; 
     27 
     28    $deleted = $approved = $unapproved = $spammed = 0; 
     29    foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each 
     30        $comment_id = (int) $comment_id; 
     31        $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); 
     32 
    3133        if ( !current_user_can('edit_post', $post_id) ) 
    3234            continue; 
    33         if ( $_REQUEST['action'] == 'markspam' ) { 
    34             wp_set_comment_status($comment, 'spam'); 
    35             $comments_spammed++; 
    36         } elseif ( $_REQUEST['action'] == 'delete' ) { 
    37             wp_set_comment_status($comment, 'delete'); 
    38             $comments_deleted++; 
    39         } elseif ( $_REQUEST['action'] == 'approve' ) { 
    40             wp_set_comment_status($comment, 'approve'); 
    41             $comments_approved++; 
    42         } elseif ( $_REQUEST['action'] == 'unapprove' ) { 
    43             wp_set_comment_status($comment, 'hold'); 
    44             $comments_unapproved++; 
     35 
     36        switch( $doaction ) { 
     37            case 'markspam' : 
     38                wp_set_comment_status($comment_id, 'spam'); 
     39                $spammed++; 
     40                break; 
     41            case 'delete' : 
     42                wp_set_comment_status($comment_id, 'delete'); 
     43                $deleted++; 
     44                break; 
     45            case 'approve' : 
     46                wp_set_comment_status($comment_id, 'approve'); 
     47                $approved++; 
     48                break; 
     49            case 'unapprove' : 
     50                wp_set_comment_status($comment_id, 'hold'); 
     51                $unapproved++; 
     52                break; 
    4553        } 
    4654    endforeach; 
    47     $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved; 
     55 
     56    $redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved; 
    4857    if ( isset($_REQUEST['apage']) ) 
    4958        $redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to ); 
     
    5564        $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to); 
    5665    wp_redirect( $redirect_to ); 
    57 } elseif ( !empty($_GET['_wp_http_referer']) ) { 
    58      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     66} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 
     67     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 
    5968     exit; 
    6069} 
     
    112121} 
    113122?> 
     123 
    114124<div class="wrap"> 
    115125 
     
    144154 
    145155<?php 
    146  
    147156$comments_per_page = apply_filters('comments_per_page', 20, $comment_status); 
    148157 
     
    181190<div class="alignleft"> 
    182191<select name="action"> 
    183 <option value="" selected="selected"><?php _e('Actions') ?></option> 
     192<option value="-1" selected="selected"><?php _e('Actions') ?></option> 
    184193<?php if ( empty($comment_status) || 'approved' == $comment_status ): ?> 
    185194<option value="unapprove"><?php _e('Unapprove'); ?></option> 
     
    199208<?php } 
    200209 
    201 if ( 'spam' == $comment_status ) {  
     210if ( 'spam' == $comment_status ) { 
    202211    wp_nonce_field('bulk-spam-delete'); ?> 
    203212<input type="submit" name="delete_all_spam" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> 
     
    211220 
    212221<br class="clear" /> 
    213 <?php 
    214 if ($comments) { 
    215 ?> 
     222 
     223<?php if ( $comments ) { ?> 
    216224<table class="widefat"> 
    217225<thead> 
     
    220228    </tr> 
    221229</thead> 
     230 
     231<tfoot> 
     232    <tr> 
     233<?php print_column_headers('comment', false); ?> 
     234    </tr> 
     235</tfoot> 
     236 
    222237<tbody id="the-comment-list" class="list:comment"> 
    223238<?php 
     
    233248</tbody> 
    234249</table> 
     250 
     251<div class="tablenav"> 
     252<?php 
     253if ( $page_links ) 
     254    echo "<div class='tablenav-pages'>$page_links</div>"; 
     255?> 
     256 
     257<div class="alignleft"> 
     258<select name="action2"> 
     259<option value="-1" selected="selected"><?php _e('Actions') ?></option> 
     260<?php if ( empty($comment_status) || 'approved' == $comment_status ): ?> 
     261<option value="unapprove"><?php _e('Unapprove'); ?></option> 
     262<?php endif; ?> 
     263<?php if ( empty($comment_status) || 'moderated' == $comment_status ): ?> 
     264<option value="approve"><?php _e('Approve'); ?></option> 
     265<?php endif; ?> 
     266<?php if ( 'spam' != $comment_status ): ?> 
     267<option value="markspam"><?php _e('Mark as Spam'); ?></option> 
     268<?php endif; ?> 
     269<option value="delete"><?php _e('Delete'); ?></option> 
     270</select> 
     271<input type="submit" name="doaction2" id="doaction2" value="<?php _e('Apply'); ?>" class="button-secondary apply" /> 
     272 
     273<?php if ( 'spam' == $comment_status ) { ?> 
     274<input type="submit" name="delete_all_spam2" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> 
     275<?php } ?> 
     276<?php do_action('manage_comments_nav', $comment_status); ?> 
     277</div> 
     278 
     279<br class="clear" /> 
     280</div> 
    235281 
    236282</form> 
     
    252298</p> 
    253299<?php 
    254 } else
     300} else
    255301?> 
    256302<p> 
     
    260306} 
    261307?> 
    262 <div class="tablenav"> 
    263 <?php 
    264 if ( $page_links ) 
    265     echo "<div class='tablenav-pages'>$page_links</div>"; 
    266 ?> 
    267 <br class="clear" /> 
    268 </div> 
    269308 
    270309</div> 
  • 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&#8217; 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> 
  • trunk/wp-admin/edit-pages.php

    r9018 r9028  
    1111 
    1212// Handle bulk actions 
    13 if ( isset($_GET['action']) && $_GET['action'] != -1 ) { 
    14     switch ( $_GET['action'] ) { 
     13if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { 
     14    $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; 
     15 
     16    switch ( $doaction ) { 
    1517        case 'delete': 
    1618            if ( isset($_GET['post']) && isset($_GET['doaction']) ) { 
     
    1820                foreach( (array) $_GET['post'] as $post_id_del ) { 
    1921                    $post_del = & get_post($post_id_del); 
    20          
     22 
    2123                    if ( !current_user_can('delete_page', $post_id_del) ) 
    2224                        wp_die( __('You are not allowed to delete this page.') ); 
    23          
     25 
    2426                    if ( $post_del->post_type == 'attachment' ) { 
    2527                        if ( ! wp_delete_attachment($post_id_del) ) 
     
    3638                check_admin_referer('bulk-pages'); 
    3739                $_GET['post_status'] = $_GET['_status']; 
    38      
     40 
    3941                if ( -1 == $_GET['post_author'] ) 
    4042                    unset($_GET['post_author']); 
    41      
     43 
    4244                $done = bulk_edit_posts($_GET); 
    4345            } 
     
    5658    wp_redirect($sendback); 
    5759    exit(); 
    58 } elseif ( !empty($_GET['_wp_http_referer']) ) { 
    59      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     60} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 
     61     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 
    6062     exit; 
    6163} 
     
    108110</div></div> 
    109111 
    110 <?php if ( isset($_GET['upd']) && (int) $_GET['upd'] ) { ?> 
     112<div class="wrap"> 
     113 
     114<?php if ( isset($_GET['upd']) || isset($_GET['skip']) ) { ?> 
    111115<div id="message" class="updated fade"><p> 
    112 <?php printf( __ngettext( '%d page updated.', '%d pages updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) ); 
    113 unset($_GET['upd']); 
    114      
    115     if ( isset($_GET['skip']) && (int) $_GET['skip'] ) { 
    116         printf( __ngettext( ' %d page not updated. Somebody is editing it.', ' %d pages not updated. Somebody is editing them.', $_GET['skip'] ), number_format_i18n( $_GET['skip'] ) ); 
    117         unset($_GET['skip']); 
    118     } ?> 
     116<?php if ( (int) $_GET['upd'] ) { 
     117    printf( __ngettext( '%d page updated.', '%d pages updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) ); 
     118    unset($_GET['upd']); 
     119
     120 
     121if ( (int) $_GET['skip'] ) { 
     122    printf( __ngettext( ' %d page not updated. Somebody is editing it.', ' %d pages not updated. Somebody is editing them.', $_GET['skip'] ), number_format_i18n( $_GET['skip'] ) ); 
     123    unset($_GET['skip']); 
     124} ?> 
    119125</p></div> 
    120126<?php } ?> 
    121127 
    122 <div class="wrap"> 
     128<?php if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 
     129<div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit page'); ?></a></p></div> 
     130<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 
     131endif; ?> 
    123132 
    124133<h2><?php 
     
    159168</ul> 
    160169 
     170<form id="posts-filter" action="" method="get"> 
     171 
    161172<?php if ( isset($_GET['post_status'] ) ) : ?> 
    162173<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" /> 
    163 <?php endif; 
    164  
    165 if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 
    166 <div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit page'); ?></a></p></div> 
    167 <?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 
    168 endif; 
    169 ?> 
     174<?php endif; ?> 
    170175 
    171176<div class="tablenav"> 
     
    190195?> 
    191196 
    192 <form id="posts-filter" action="" method="get"> 
    193  
    194197<div class="alignleft"> 
    195198<select name="action"> 
    196 <option value="-1" selected><?php _e('Actions'); ?></option> 
     199<option value="-1" selected="selected"><?php _e('Actions'); ?></option> 
    197200<option value="edit"><?php _e('Edit'); ?></option> 
    198201<option value="delete"><?php _e('Delete'); ?></option> 
     
    219222  </tr> 
    220223  </thead> 
     224 
     225  <tfoot> 
     226  <tr> 
     227<?php print_column_headers('page', false); ?> 
     228  </tr> 
     229  </tfoot> 
     230 
    221231  <tbody> 
    222232  <?php page_rows($posts, $pagenum, $per_page); ?> 
    223233  </tbody> 
    224234</table> 
     235 
     236<div class="tablenav"> 
     237<?php 
     238if ( $page_links ) 
     239    echo "<div class='tablenav-pages'>$page_links</div>"; 
     240?> 
     241 
     242<div class="alignleft"> 
     243<select name="action2"> 
     244<option value="-1" selected="selected"><?php _e('Actions'); ?></option> 
     245<option value="edit"><?php _e('Edit'); ?></option> 
     246<option value="delete"><?php _e('Delete'); ?></option> 
     247</select> 
     248<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
     249</div> 
     250 
     251<br class="clear" /> 
     252</div> 
     253 
    225254</form> 
    226255 
     
    238267?> 
    239268 
    240 <div class="tablenav"> 
    241 <?php 
    242 if ( $page_links ) 
    243     echo "<div class='tablenav-pages'>$page_links</div>"; 
    244 ?> 
    245 <br class="clear" /> 
    246 </div> 
    247269 
    248270<?php 
  • trunk/wp-admin/edit-post-rows.php

    r8981 r9028  
    1515    </tr> 
    1616    </thead> 
     17 
     18    <tfoot> 
     19    <tr> 
     20<?php print_column_headers('post', false); ?> 
     21    </tr> 
     22    </tfoot> 
     23 
    1724    <tbody> 
    18  
    1925<?php 
    2026if ( have_posts() ) { 
     
    2935?> 
    3036    </tbody> 
    31     <thead> 
    32     <tr> 
    33 <?php print_column_headers('post'); ?> 
    34     </tr> 
    35     </thead> 
    3637</table> 
  • trunk/wp-admin/edit-tags.php

    r9016 r9028  
    1212$title = __('Tags'); 
    1313 
    14 wp_reset_vars(array('action', 'tag')); 
    15  
    16 if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete_tags']) ) 
     14wp_reset_vars( array('action', 'tag') ); 
     15 
     16if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) ) 
    1717    $action = 'bulk-delete'; 
    1818 
     
    108108default: 
    109109 
    110 if ( !empty($_GET['_wp_http_referer']) ) { 
    111      wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 
     110if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 
     111     wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 
    112112     exit; 
    113113} 
     
    188188    </tr> 
    189189    </thead> 
     190 
     191    <tfoot> 
     192    <tr> 
     193<?php print_column_headers('tag', false); ?> 
     194    </tr> 
     195    </tfoot> 
     196 
    190197    <tbody id="the-list" class="list:tag"> 
    191198<?php 
     
    198205</table> 
    199206 
    200 </form> 
    201  
    202207<div class="tablenav"> 
    203  
    204208<?php 
    205209if ( $page_links ) 
    206210    echo "<div class='tablenav-pages'>$page_links</div>"; 
    207211?> 
    208 <br class="clear" /> 
    209 </div> 
    210 <br class="clear" /> 
     212 
     213<div class="alignleft"> 
     214<select name="action2"> 
     215<option value="" selected><?php _e('Actions'); ?></option> 
     216<option value="delete"><?php _e('Delete'); ?></option> 
     217</select> 
     218<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
     219</div> 
     220 
     221<br class="clear" /> 
     222</div> 
     223 
     224<br class="clear" /> 
     225</form> 
    211226 
    212227</div> 
  • 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 
  • trunk/wp-admin/includes/plugin-install.php

    r8912 r9028  
    213213            </tr> 
    214214        </thead> 
     215 
     216        <tfoot> 
     217            <tr> 
     218                <th scope="col" class="name"><?php _e('Name'); ?></th> 
     219                <th scope="col" class="num"><?php _e('Version'); ?></th> 
     220                <th scope="col" class="num"><?php _e('Rating'); ?></th> 
     221                <th scope="col" class="desc"><?php _e('Description'); ?></th> 
     222                <th scope="col" class="action-links"><?php _e('Actions'); ?></th> 
     223            </tr> 
     224        </tfoot> 
     225 
    215226        <tbody class="plugins"> 
    216227        <?php 
     
    265276        </tbody> 
    266277    </table> 
     278 
     279    <div class="tablenav"> 
     280        <?php if ( $page_links ) 
     281                echo "\t\t<div class='tablenav-pages'>$page_links</div>"; ?> 
     282    </div> 
     283    <br class="clear" /> 
     284 
    267285<?php 
    268286} 
  • trunk/wp-admin/includes/template.php

    r9023 r9028  
    583583} 
    584584 
    585 function print_column_headers( $type ) { 
     585function print_column_headers( $type, $id = true ) { 
    586586    $columns = get_column_headers( $type ); 
    587587    $hidden = (array) get_user_option( "manage-$type-columns-hidden" ); 
     
    615615        $style = ' style="' . $style . '"'; 
    616616?> 
    617     <th scope="col" <?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th> 
     617    <th scope="col" <?php echo $id ? "id=\"$column_key\"" : ""; echo $class; echo $style; ?>><?php echo $column_display_name; ?></th> 
    618618<?php } 
    619619} 
  • 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 
  • trunk/wp-admin/plugins.php

    r8973 r9028  
    280280    </tr> 
    281281    </thead> 
     282     
     283    <tfoot> 
     284    <tr> 
     285        <th scope="col" class="check-column"><input type="checkbox" /></th> 
     286        <th scope="col"><?php _e('Plugin'); ?></th> 
     287        <th scope="col" class="num"><?php _e('Version'); ?></th> 
     288        <th scope="col"><?php _e('Description'); ?></th> 
     289        <th scope="col" class="action-links"><?php _e('Action'); ?></th> 
     290    </tr> 
     291    </tfoot> 
     292     
    282293    <tbody class="plugins"> 
    283294<?php 
  • trunk/wp-admin/upload.php

    r9020 r9028  
    400400} ?> 
    401401 
    402 </form> 
    403  
    404402<div id="ajax-response"></div> 
    405403 
     
    411409?> 
    412410 
     411<div class="alignleft"> 
     412<select name="action2" id="select-action"> 
     413<option value="" selected><?php _e('Actions'); ?></option> 
     414<option value="delete"><?php _e('Delete'); ?></option> 
     415<?php if ( isset($orphans) ) { ?> 
     416<option value="attach"><?php _e('Attach to a post'); ?></option> 
     417<?php } ?> 
     418</select> 
     419<input type="submit" id="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
    413420</div> 
    414421 
     422<br class="clear" /> 
     423</div> 
     424</form> 
    415425<br class="clear" /> 
    416426 
  • trunk/wp-admin/users.php

    r9016 r9028  
    1919$parent_file = 'users.php'; 
    2020 
    21 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 
    22 $update = ''; 
    23  
    24 if ( empty($action) ) { 
     21$update = $doaction = ''; 
     22if ( isset($_REQUEST['action']) ) 
     23    $doaction = $_REQUEST['action'] ? $_REQUEST['action'] : $_REQUEST['action2']; 
     24 
     25if ( empty($doaction) ) { 
    2526    if ( isset($_GET['changeit']) && !empty($_GET['new_role']) ) 
    26         $action = 'promote'; 
     27        $doaction = 'promote'; 
    2728} 
    2829 
     
    3738} 
    3839 
    39 switch ($action) { 
     40switch ($doaction) { 
    4041 
    4142case 'promote': 
     
    208209    $userspage = isset($_GET['userspage']) ? $_GET['userspage'] : null; 
    209210    $role = isset($_GET['role']) ? $_GET['role'] : null; 
    210      
     211 
    211212    // Query the users 
    212213    $wp_user_search = new WP_User_Search($usersearch, $userspage, $role); 
    213      
     214 
    214215    $messages = array(); 
    215216    if ( isset($_GET['update']) ) : 
     
    259260        </ul> 
    260261    </div> 
    261 <?php endif;  
     262<?php endif; 
    262263 
    263264if ( ! empty($messages) ) { 
     
    359360</tr> 
    360361</thead> 
     362 
     363<tfoot> 
     364<tr class="thead"> 
     365<?php print_column_headers('user', false) ?> 
     366</tr> 
     367</tfoot> 
     368 
    361369<tbody id="users" class="list:user user-list"> 
    362370<?php 
     
    379387    <div class="tablenav-pages"><?php $wp_user_search->page_links(); ?></div> 
    380388<?php endif; ?> 
     389 
     390<div class="alignleft"> 
     391<select name="action2"> 
     392<option value="" selected><?php _e('Actions'); ?></option> 
     393<option value="delete"><?php _e('Delete'); ?></option> 
     394</select> 
     395<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
     396</div> 
    381397 
    382398<br class="clear" /> 
     
    475491break; 
    476492 
    477 } // end of the $action switch 
     493} // end of the $doaction switch 
    478494 
    479495include('admin-footer.php');