Add table footers and action selects at the bottom
git-svn-id: http://svn.automattic.com/wordpress/trunk@9028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
902f570a18
commit
6cd6f6d9f8
|
@ -87,7 +87,7 @@ if ( 'index.php' == $pagenow ) {
|
|||
$breadcrumb = '<a href="index.php">' . __('Dashboard') . '</a> › ' . $title;
|
||||
}
|
||||
?>
|
||||
<img id="logo50" src="images/logo50.png" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo ' '; else echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1>
|
||||
<img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo ' '; else echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -13,7 +13,7 @@ $title = __('Categories');
|
|||
|
||||
wp_reset_vars( array('action', 'cat') );
|
||||
|
||||
if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete']) )
|
||||
if ( isset( $_GET['action'] ) && isset($_GET['delete']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) )
|
||||
$action = 'bulk-delete';
|
||||
|
||||
switch($action) {
|
||||
|
@ -102,7 +102,7 @@ break;
|
|||
|
||||
default:
|
||||
|
||||
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||
if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -183,6 +183,13 @@ if ( $page_links )
|
|||
<?php print_column_headers('category'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('category', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-list" class="list:cat">
|
||||
<?php
|
||||
cat_rows(0, 0, 0, $pagenum, $catsperpage);
|
||||
|
@ -190,17 +197,26 @@ cat_rows(0, 0, 0, $pagenum, $catsperpage);
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="tablenav">
|
||||
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
<?php wp_nonce_field('bulk-categories'); ?>
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -321,7 +321,12 @@ div.dashboard-widget-submit input,
|
|||
}
|
||||
|
||||
.widefat thead,
|
||||
.widefat tfoot,
|
||||
.thead,
|
||||
.tfoot,
|
||||
h3.dashboard-widget-title,
|
||||
h3.dashboard-widget-title span,
|
||||
h3.dashboard-widget-title small,
|
||||
.find-box-head {
|
||||
background-color: #464646;
|
||||
color: #d7d7d7;
|
||||
|
|
|
@ -315,7 +315,9 @@ div.dashboard-widget-submit input,
|
|||
}
|
||||
|
||||
.widefat thead,
|
||||
.widefat tfoot,
|
||||
.thead,
|
||||
.tfoot,
|
||||
h3.dashboard-widget-title,
|
||||
h3.dashboard-widget-title span,
|
||||
h3.dashboard-widget-title small,
|
||||
|
|
|
@ -14,6 +14,13 @@ if ( ! defined('ABSPATH') ) die();
|
|||
<?php print_column_headers('media'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('media', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-list" class="list:post">
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
|
|
|
@ -21,30 +21,39 @@ if ( isset( $_POST['delete_all_spam'] ) ) {
|
|||
wp_redirect('edit-comments.php?deleted=' . (int) $deleted_spam);
|
||||
}
|
||||
|
||||
if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) {
|
||||
if ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) {
|
||||
check_admin_referer('bulk-comments');
|
||||
$doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2'];
|
||||
|
||||
$deleted = $approved = $unapproved = $spammed = 0;
|
||||
foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each
|
||||
$comment_id = (int) $comment_id;
|
||||
$post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) );
|
||||
|
||||
$comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0;
|
||||
foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each
|
||||
$comment = (int) $comment;
|
||||
$post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment) );
|
||||
if ( !current_user_can('edit_post', $post_id) )
|
||||
continue;
|
||||
if ( $_REQUEST['action'] == 'markspam' ) {
|
||||
wp_set_comment_status($comment, 'spam');
|
||||
$comments_spammed++;
|
||||
} elseif ( $_REQUEST['action'] == 'delete' ) {
|
||||
wp_set_comment_status($comment, 'delete');
|
||||
$comments_deleted++;
|
||||
} elseif ( $_REQUEST['action'] == 'approve' ) {
|
||||
wp_set_comment_status($comment, 'approve');
|
||||
$comments_approved++;
|
||||
} elseif ( $_REQUEST['action'] == 'unapprove' ) {
|
||||
wp_set_comment_status($comment, 'hold');
|
||||
$comments_unapproved++;
|
||||
|
||||
switch( $doaction ) {
|
||||
case 'markspam' :
|
||||
wp_set_comment_status($comment_id, 'spam');
|
||||
$spammed++;
|
||||
break;
|
||||
case 'delete' :
|
||||
wp_set_comment_status($comment_id, 'delete');
|
||||
$deleted++;
|
||||
break;
|
||||
case 'approve' :
|
||||
wp_set_comment_status($comment_id, 'approve');
|
||||
$approved++;
|
||||
break;
|
||||
case 'unapprove' :
|
||||
wp_set_comment_status($comment_id, 'hold');
|
||||
$unapproved++;
|
||||
break;
|
||||
}
|
||||
endforeach;
|
||||
$redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved;
|
||||
|
||||
$redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved;
|
||||
if ( isset($_REQUEST['apage']) )
|
||||
$redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to );
|
||||
if ( !empty($_REQUEST['mode']) )
|
||||
|
@ -54,7 +63,7 @@ if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) {
|
|||
if ( !empty($_REQUEST['s']) )
|
||||
$redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to);
|
||||
wp_redirect( $redirect_to );
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -111,6 +120,7 @@ if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['sp
|
|||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<h2><?php _e('Manage Comments'); ?></h2>
|
||||
|
@ -143,7 +153,6 @@ unset($status_links);
|
|||
</ul>
|
||||
|
||||
<?php
|
||||
|
||||
$comments_per_page = apply_filters('comments_per_page', 20, $comment_status);
|
||||
|
||||
if ( isset( $_GET['apage'] ) )
|
||||
|
@ -180,7 +189,7 @@ if ( $page_links )
|
|||
|
||||
<div class="alignleft">
|
||||
<select name="action">
|
||||
<option value="" selected="selected"><?php _e('Actions') ?></option>
|
||||
<option value="-1" selected="selected"><?php _e('Actions') ?></option>
|
||||
<?php if ( empty($comment_status) || 'approved' == $comment_status ): ?>
|
||||
<option value="unapprove"><?php _e('Unapprove'); ?></option>
|
||||
<?php endif; ?>
|
||||
|
@ -210,15 +219,21 @@ if ( 'spam' == $comment_status ) {
|
|||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
<?php
|
||||
if ($comments) {
|
||||
?>
|
||||
|
||||
<?php if ( $comments ) { ?>
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php print_column_headers('comment'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('comment', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-comment-list" class="list:comment">
|
||||
<?php
|
||||
foreach ($comments as $comment)
|
||||
|
@ -233,6 +248,37 @@ if ($comments) {
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tablenav">
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="-1" selected="selected"><?php _e('Actions') ?></option>
|
||||
<?php if ( empty($comment_status) || 'approved' == $comment_status ): ?>
|
||||
<option value="unapprove"><?php _e('Unapprove'); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php if ( empty($comment_status) || 'moderated' == $comment_status ): ?>
|
||||
<option value="approve"><?php _e('Approve'); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php if ( 'spam' != $comment_status ): ?>
|
||||
<option value="markspam"><?php _e('Mark as Spam'); ?></option>
|
||||
<?php endif; ?>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" name="doaction2" id="doaction2" value="<?php _e('Apply'); ?>" class="button-secondary apply" />
|
||||
|
||||
<?php if ( 'spam' == $comment_status ) { ?>
|
||||
<input type="submit" name="delete_all_spam2" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" />
|
||||
<?php } ?>
|
||||
<?php do_action('manage_comments_nav', $comment_status); ?>
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<form id="get-extra-comments" method="post" action="" class="add:the-extra-comment-list:" style="display: none;">
|
||||
|
@ -259,13 +305,6 @@ if ($comments) {
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="tablenav">
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -12,11 +12,12 @@ require_once('admin.php');
|
|||
// Handle bulk actions
|
||||
if ( isset($_GET['action']) && isset($_GET['delete']) ) {
|
||||
check_admin_referer('bulk-link-categories');
|
||||
$doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2'];
|
||||
|
||||
if ( !current_user_can('manage_categories') )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
|
||||
if ( $_GET['action'] == 'delete' ) {
|
||||
if ( 'delete' == $doaction ) {
|
||||
foreach( (array) $_GET['delete'] as $cat_ID ) {
|
||||
$cat_name = get_term_field('name', $cat_ID, 'link_category');
|
||||
$default_cat_id = get_option('default_link_category');
|
||||
|
@ -38,7 +39,7 @@ if ( isset($_GET['action']) && isset($_GET['delete']) ) {
|
|||
wp_redirect($location);
|
||||
exit();
|
||||
}
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -120,6 +121,13 @@ if ( $page_links )
|
|||
<?php print_column_headers('link-category'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('link-category', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-list" class="list:link-cat">
|
||||
<?php
|
||||
$start = ($pagenum - 1) * $catsperpage;
|
||||
|
@ -143,17 +151,24 @@ if ( $categories ) {
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="tablenav">
|
||||
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<br class="clear" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
require_once('admin.php');
|
||||
|
||||
// Handle bulk actions
|
||||
if ( isset($_GET['action']) && $_GET['action'] != -1 ) {
|
||||
switch ( $_GET['action'] ) {
|
||||
if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) {
|
||||
$doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2'];
|
||||
|
||||
switch ( $doaction ) {
|
||||
case 'delete':
|
||||
if ( isset($_GET['post']) && isset($_GET['doaction']) ) {
|
||||
check_admin_referer('bulk-pages');
|
||||
|
@ -55,7 +57,7 @@ if ( isset($_GET['action']) && $_GET['action'] != -1 ) {
|
|||
}
|
||||
wp_redirect($sendback);
|
||||
exit();
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -107,19 +109,26 @@ require_once('admin-header.php'); ?>
|
|||
</div></form>
|
||||
</div></div>
|
||||
|
||||
<?php if ( isset($_GET['upd']) && (int) $_GET['upd'] ) { ?>
|
||||
<div id="message" class="updated fade"><p>
|
||||
<?php printf( __ngettext( '%d page updated.', '%d pages updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) );
|
||||
unset($_GET['upd']);
|
||||
<div class="wrap">
|
||||
|
||||
if ( isset($_GET['skip']) && (int) $_GET['skip'] ) {
|
||||
<?php if ( isset($_GET['upd']) || isset($_GET['skip']) ) { ?>
|
||||
<div id="message" class="updated fade"><p>
|
||||
<?php if ( (int) $_GET['upd'] ) {
|
||||
printf( __ngettext( '%d page updated.', '%d pages updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) );
|
||||
unset($_GET['upd']);
|
||||
}
|
||||
|
||||
if ( (int) $_GET['skip'] ) {
|
||||
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'] ) );
|
||||
unset($_GET['skip']);
|
||||
} ?>
|
||||
</p></div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="wrap">
|
||||
<?php if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<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>
|
||||
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
|
||||
endif; ?>
|
||||
|
||||
<h2><?php
|
||||
// Use $_GET instead of is_ since they can override each other
|
||||
|
@ -158,15 +167,11 @@ unset($status_links);
|
|||
?>
|
||||
</ul>
|
||||
|
||||
<form id="posts-filter" action="" method="get">
|
||||
|
||||
<?php if ( isset($_GET['post_status'] ) ) : ?>
|
||||
<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" />
|
||||
<?php endif;
|
||||
|
||||
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>
|
||||
<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>
|
||||
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
|
||||
endif;
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="tablenav">
|
||||
|
||||
|
@ -189,11 +194,9 @@ if ( $page_links )
|
|||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<form id="posts-filter" action="" method="get">
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action">
|
||||
<option value="-1" selected><?php _e('Actions'); ?></option>
|
||||
<option value="-1" selected="selected"><?php _e('Actions'); ?></option>
|
||||
<option value="edit"><?php _e('Edit'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
|
@ -218,10 +221,36 @@ if ($posts) {
|
|||
<?php print_column_headers('page'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('page', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody>
|
||||
<?php page_rows($posts, $pagenum, $per_page); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tablenav">
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="-1" selected="selected"><?php _e('Actions'); ?></option>
|
||||
<option value="edit"><?php _e('Edit'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php inline_edit_row( 'page' ) ?>
|
||||
|
@ -237,13 +266,6 @@ if ($posts) {
|
|||
} // end if ($posts)
|
||||
?>
|
||||
|
||||
<div class="tablenav">
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
|
|
|
@ -14,8 +14,14 @@ if ( ! defined('ABSPATH') ) die();
|
|||
<?php print_column_headers('post'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('post', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
post_rows();
|
||||
|
@ -28,9 +34,4 @@ if ( have_posts() ) {
|
|||
} // end if ( have_posts() )
|
||||
?>
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php print_column_headers('post'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
|
|
@ -13,7 +13,7 @@ $title = __('Tags');
|
|||
|
||||
wp_reset_vars( array('action', 'tag') );
|
||||
|
||||
if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete_tags']) )
|
||||
if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) )
|
||||
$action = 'bulk-delete';
|
||||
|
||||
switch($action) {
|
||||
|
@ -107,7 +107,7 @@ break;
|
|||
|
||||
default:
|
||||
|
||||
if ( !empty($_GET['_wp_http_referer']) ) {
|
||||
if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -187,6 +187,13 @@ if ( $page_links )
|
|||
<?php print_column_headers('tag'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('tag', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-list" class="list:tag">
|
||||
<?php
|
||||
|
||||
|
@ -197,17 +204,25 @@ $count = tag_rows( $pagenum, $tagsperpage, $searchterms );
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="tablenav">
|
||||
|
||||
<?php
|
||||
if ( $page_links )
|
||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -9,15 +9,11 @@
|
|||
/** WordPress Administration Bootstrap */
|
||||
require_once('admin.php');
|
||||
|
||||
$action = -1;
|
||||
if ( isset($_GET['action2']) && $_GET['action2'] != -1 )
|
||||
$action = $_GET['action2'];
|
||||
if ( isset($_GET['action']) && $_GET['action'] != -1 )
|
||||
$action = $_GET['action'];
|
||||
|
||||
// Handle bulk actions
|
||||
if ( $action != -1 ) {
|
||||
switch ( $action ) {
|
||||
if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) {
|
||||
$doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2'];
|
||||
|
||||
switch ( $doaction ) {
|
||||
case 'delete':
|
||||
if ( isset($_GET['post']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) {
|
||||
check_admin_referer('bulk-posts');
|
||||
|
@ -62,7 +58,7 @@ if ( $action != -1 ) {
|
|||
}
|
||||
wp_redirect($sendback);
|
||||
exit();
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -319,6 +315,15 @@ if ( 1 == count($posts) && is_singular() ) :
|
|||
<th scope="col"><?php _e('Submitted') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col"><?php _e('Comment') ?></th>
|
||||
<th scope="col"><?php _e('Author') ?></th>
|
||||
<th scope="col"><?php _e('Submitted') ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-comment-list" class="list:comment">
|
||||
<?php
|
||||
foreach ($comments as $comment)
|
||||
|
|
|
@ -212,6 +212,17 @@ function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
|||
<th scope="col" class="action-links"><?php _e('Actions'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="name"><?php _e('Name'); ?></th>
|
||||
<th scope="col" class="num"><?php _e('Version'); ?></th>
|
||||
<th scope="col" class="num"><?php _e('Rating'); ?></th>
|
||||
<th scope="col" class="desc"><?php _e('Description'); ?></th>
|
||||
<th scope="col" class="action-links"><?php _e('Actions'); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="plugins">
|
||||
<?php
|
||||
if( empty($plugins) )
|
||||
|
@ -264,6 +275,13 @@ function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
|||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tablenav">
|
||||
<?php if ( $page_links )
|
||||
echo "\t\t<div class='tablenav-pages'>$page_links</div>"; ?>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ function get_column_headers($page) {
|
|||
return $columns;
|
||||
}
|
||||
|
||||
function print_column_headers( $type ) {
|
||||
function print_column_headers( $type, $id = true ) {
|
||||
$columns = get_column_headers( $type );
|
||||
$hidden = (array) get_user_option( "manage-$type-columns-hidden" );
|
||||
$styles = array();
|
||||
|
@ -614,7 +614,7 @@ function print_column_headers( $type ) {
|
|||
$style .= ' ' . $styles[$type][$column_key];
|
||||
$style = ' style="' . $style . '"';
|
||||
?>
|
||||
<th scope="col" <?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th>
|
||||
<th scope="col" <?php echo $id ? "id=\"$column_key\"" : ""; echo $class; echo $style; ?>><?php echo $column_display_name; ?></th>
|
||||
<?php }
|
||||
}
|
||||
|
||||
|
|
|
@ -10,13 +10,14 @@
|
|||
require_once ('admin.php');
|
||||
|
||||
// Handle bulk deletes
|
||||
if ( isset($_GET['action']) && isset($_GET['linkcheck']) && isset($_GET['doaction']) ) {
|
||||
if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) {
|
||||
check_admin_referer('bulk-bookmarks');
|
||||
$doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2'];
|
||||
|
||||
if ( ! current_user_can('manage_links') )
|
||||
wp_die( __('You do not have sufficient permissions to edit the links for this blog.') );
|
||||
|
||||
if ( $_GET['action'] == 'delete' ) {
|
||||
if ( 'delete' == $doaction ) {
|
||||
foreach ( (array) $_GET['linkcheck'] as $link_id ) {
|
||||
$link_id = (int) $link_id;
|
||||
|
||||
|
@ -28,7 +29,7 @@ if ( isset($_GET['action']) && isset($_GET['linkcheck']) && isset($_GET['doactio
|
|||
wp_redirect($sendback);
|
||||
exit;
|
||||
}
|
||||
} elseif ( !empty($_GET['_wp_http_referer']) ) {
|
||||
} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) {
|
||||
wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) );
|
||||
exit;
|
||||
}
|
||||
|
@ -158,6 +159,13 @@ if ( $links ) {
|
|||
<?php print_column_headers('link'); ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php print_column_headers('link', false); ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$alt = 0;
|
||||
|
@ -248,15 +256,23 @@ if ( $links ) {
|
|||
<p><?php _e('No links found.') ?></p>
|
||||
<?php } ?>
|
||||
|
||||
<div class="tablenav">
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div id="ajax-response"></div>
|
||||
|
||||
<div class="tablenav">
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php include('admin-footer.php'); ?>
|
||||
|
|
|
@ -279,6 +279,17 @@ function print_plugins_table($plugins, $context = '') {
|
|||
<th scope="col" class="action-links"><?php _e('Action'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="check-column"><input type="checkbox" /></th>
|
||||
<th scope="col"><?php _e('Plugin'); ?></th>
|
||||
<th scope="col" class="num"><?php _e('Version'); ?></th>
|
||||
<th scope="col"><?php _e('Description'); ?></th>
|
||||
<th scope="col" class="action-links"><?php _e('Action'); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody class="plugins">
|
||||
<?php
|
||||
|
||||
|
|
|
@ -399,8 +399,6 @@ if ( $page_links )
|
|||
include( 'edit-attachment-rows.php' );
|
||||
} ?>
|
||||
|
||||
</form>
|
||||
|
||||
<div id="ajax-response"></div>
|
||||
|
||||
<div class="tablenav">
|
||||
|
@ -410,8 +408,20 @@ if ( $page_links )
|
|||
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||
?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2" id="select-action">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
<?php if ( isset($orphans) ) { ?>
|
||||
<option value="attach"><?php _e('Attach to a post'); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="submit" id="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
</form>
|
||||
<br class="clear" />
|
||||
|
||||
<?php
|
||||
|
|
|
@ -18,12 +18,13 @@ if ( !current_user_can('edit_users') )
|
|||
$title = __('Users');
|
||||
$parent_file = 'users.php';
|
||||
|
||||
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
||||
$update = '';
|
||||
$update = $doaction = '';
|
||||
if ( isset($_REQUEST['action']) )
|
||||
$doaction = $_REQUEST['action'] ? $_REQUEST['action'] : $_REQUEST['action2'];
|
||||
|
||||
if ( empty($action) ) {
|
||||
if ( empty($doaction) ) {
|
||||
if ( isset($_GET['changeit']) && !empty($_GET['new_role']) )
|
||||
$action = 'promote';
|
||||
$doaction = 'promote';
|
||||
}
|
||||
|
||||
if ( empty($_REQUEST) ) {
|
||||
|
@ -36,7 +37,7 @@ if ( empty($_REQUEST) ) {
|
|||
$referer = '';
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
switch ($doaction) {
|
||||
|
||||
case 'promote':
|
||||
check_admin_referer('bulk-users');
|
||||
|
@ -358,6 +359,13 @@ unset($role_links);
|
|||
<?php print_column_headers('user') ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr class="thead">
|
||||
<?php print_column_headers('user', false) ?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="users" class="list:user user-list">
|
||||
<?php
|
||||
$style = '';
|
||||
|
@ -379,6 +387,14 @@ foreach ( $wp_user_search->get_results() as $userid ) {
|
|||
<div class="tablenav-pages"><?php $wp_user_search->page_links(); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="alignleft">
|
||||
<select name="action2">
|
||||
<option value="" selected><?php _e('Actions'); ?></option>
|
||||
<option value="delete"><?php _e('Delete'); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
|
||||
</div>
|
||||
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
|
@ -474,7 +490,7 @@ foreach ( $wp_user_search->get_results() as $userid ) {
|
|||
}
|
||||
break;
|
||||
|
||||
} // end of the $action switch
|
||||
} // end of the $doaction switch
|
||||
|
||||
include('admin-footer.php');
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue