web/wp-admin/edit-comments.php
branchwordpress
changeset 132 4d4862461b8d
parent 109 03b0d1493584
equal deleted inserted replaced
131:a4642baaf829 132:4d4862461b8d
    15 wp_enqueue_script('admin-comments');
    15 wp_enqueue_script('admin-comments');
    16 enqueue_comment_hotkeys_js();
    16 enqueue_comment_hotkeys_js();
    17 
    17 
    18 $post_id = isset($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0;
    18 $post_id = isset($_REQUEST['p']) ? (int) $_REQUEST['p'] : 0;
    19 
    19 
    20 if ( ( isset( $_REQUEST['delete_all_spam'] ) || isset( $_REQUEST['delete_all_spam2'] ) ) && !empty( $_REQUEST['pagegen_timestamp'] ) ) {
    20 if ( isset($_REQUEST['doaction']) ||  isset($_REQUEST['doaction2']) || isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2']) ) {
    21 	check_admin_referer('bulk-spam-delete', '_spam_nonce');
    21 	check_admin_referer('bulk-comments');
    22 
    22 
    23 	$delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] );
    23 	if ( (isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2'])) && !empty($_REQUEST['pagegen_timestamp']) ) {
    24 	if ( current_user_can('moderate_comments')) {
    24 		$comment_status = $wpdb->escape($_REQUEST['comment_status']);
    25 		$deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" );
    25 		$delete_time = $wpdb->escape($_REQUEST['pagegen_timestamp']);
       
    26 		$comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = '$comment_status' AND '$delete_time' > comment_date_gmt" );
       
    27 		$doaction = 'delete';
       
    28 	} elseif ( ($_REQUEST['action'] != -1 || $_REQUEST['action2'] != -1) && isset($_REQUEST['delete_comments']) ) {
       
    29 		$comment_ids = $_REQUEST['delete_comments'];
       
    30 		$doaction = ($_REQUEST['action'] != -1) ? $_REQUEST['action'] : $_REQUEST['action2'];
       
    31 	} elseif ( $_REQUEST['doaction'] == 'undo' && isset($_REQUEST['ids']) ) {
       
    32 		$comment_ids = array_map( 'absint', explode(',', $_REQUEST['ids']) );
       
    33 		$doaction = $_REQUEST['action'];
    26 	} else {
    34 	} else {
    27 		$deleted_spam = 0;
    35 		wp_redirect($_SERVER['HTTP_REFERER']);
    28 	}
    36 	}
    29 	$redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam;
    37 
    30 	if ( $post_id )
    38 	$approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0;
    31 		$redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to );
    39 
    32 	wp_redirect( $redirect_to );
    40 	foreach ($comment_ids as $comment_id) { // Check the permissions on each
    33 } elseif ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) {
       
    34 	check_admin_referer('bulk-comments');
       
    35 	$doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2'];
       
    36 
       
    37 	$deleted = $approved = $unapproved = $spammed = 0;
       
    38 	foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each
       
    39 		$comment_id = (int) $comment_id;
       
    40 		$_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) );
    41 		$_post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) );
    41 
    42 
    42 		if ( !current_user_can('edit_post', $_post_id) )
    43 		if ( !current_user_can('edit_post', $_post_id) )
    43 			continue;
    44 			continue;
    44 
    45 
    45 		switch( $doaction ) {
    46 		switch( $doaction ) {
    46 			case 'markspam' :
       
    47 				wp_set_comment_status($comment_id, 'spam');
       
    48 				$spammed++;
       
    49 				break;
       
    50 			case 'delete' :
       
    51 				wp_set_comment_status($comment_id, 'delete');
       
    52 				$deleted++;
       
    53 				break;
       
    54 			case 'approve' :
    47 			case 'approve' :
    55 				wp_set_comment_status($comment_id, 'approve');
    48 				wp_set_comment_status($comment_id, 'approve');
    56 				$approved++;
    49 				$approved++;
    57 				break;
    50 				break;
    58 			case 'unapprove' :
    51 			case 'unapprove' :
    59 				wp_set_comment_status($comment_id, 'hold');
    52 				wp_set_comment_status($comment_id, 'hold');
    60 				$unapproved++;
    53 				$unapproved++;
    61 				break;
    54 				break;
    62 		}
    55 			case 'spam' :
    63 	endforeach;
    56 				wp_spam_comment($comment_id);
    64 
    57 				$spammed++;
    65 	$redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved;
    58 				break;
       
    59 			case 'unspam' :
       
    60 				wp_unspam_comment($comment_id);
       
    61 				$unspammed++;
       
    62 				break;
       
    63 			case 'trash' :
       
    64 				wp_trash_comment($comment_id);
       
    65 				$trashed++;
       
    66 				break;
       
    67 			case 'untrash' :
       
    68 				wp_untrash_comment($comment_id);
       
    69 				$untrashed++;
       
    70 				break;
       
    71 			case 'delete' :
       
    72 				wp_delete_comment($comment_id);
       
    73 				$deleted++;
       
    74 				break;
       
    75 		}
       
    76 	}
       
    77 
       
    78 	$redirect_to = 'edit-comments.php';
       
    79 
       
    80 	if ( $approved )
       
    81 		$redirect_to = add_query_arg( 'approved', $approved, $redirect_to );
       
    82 	if ( $unapproved )
       
    83 		$redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to );
       
    84 	if ( $spammed )
       
    85 		$redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to );
       
    86 	if ( $unspammed )
       
    87 		$redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to );
       
    88 	if ( $trashed )
       
    89 		$redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to );
       
    90 	if ( $untrashed )
       
    91 		$redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to );
       
    92 	if ( $deleted )
       
    93 		$redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to );
       
    94 	if ( $trashed || $spammed )
       
    95 		$redirect_to = add_query_arg( 'ids', join(',', $comment_ids), $redirect_to );
       
    96 
    66 	if ( $post_id )
    97 	if ( $post_id )
    67 		$redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to );
    98 		$redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to );
    68 	if ( isset($_REQUEST['apage']) )
    99 	if ( isset($_REQUEST['apage']) )
    69 		$redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to );
   100 		$redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to );
    70 	if ( !empty($_REQUEST['mode']) )
   101 	if ( !empty($_REQUEST['mode']) )
    87 require_once('admin-header.php');
   118 require_once('admin-header.php');
    88 
   119 
    89 $mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']);
   120 $mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']);
    90 
   121 
    91 $comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all';
   122 $comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all';
    92 if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam')) )
   123 if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam', 'trash')) )
    93 	$comment_status = 'all';
   124 	$comment_status = 'all';
    94 
   125 
    95 $comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : '';
   126 $comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : '';
    96 
   127 
    97 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : '';
   128 $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : '';
   103 if ( isset($_GET['s']) && $_GET['s'] )
   134 if ( isset($_GET['s']) && $_GET['s'] )
   104 	printf( '<span class="subtitle">' . sprintf( __( 'Search results for &#8220;%s&#8221;' ), wp_html_excerpt( esc_html( stripslashes( $_GET['s'] ) ), 50 ) ) . '</span>' ); ?>
   135 	printf( '<span class="subtitle">' . sprintf( __( 'Search results for &#8220;%s&#8221;' ), wp_html_excerpt( esc_html( stripslashes( $_GET['s'] ) ), 50 ) ) . '</span>' ); ?>
   105 </h2>
   136 </h2>
   106 
   137 
   107 <?php
   138 <?php
   108 if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['spam'] ) ) {
   139 if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed']) || isset($_GET['untrashed']) || isset($_GET['spammed']) || isset($_GET['unspammed']) ) {
   109 	$approved = isset( $_GET['approved'] ) ? (int) $_GET['approved'] : 0;
   140 	$approved = isset($_GET['approved']) ? (int) $_GET['approved'] : 0;
   110 	$deleted = isset( $_GET['deleted'] ) ? (int) $_GET['deleted'] : 0;
   141 	$deleted = isset($_GET['deleted']) ? (int) $_GET['deleted'] : 0;
   111 	$spam = isset( $_GET['spam'] ) ? (int) $_GET['spam'] : 0;
   142 	$trashed = isset($_GET['trashed']) ? (int) $_GET['trashed'] : 0;
   112 
   143 	$untrashed = isset($_GET['untrashed']) ? (int) $_GET['untrashed'] : 0;
   113 	if ( $approved > 0 || $deleted > 0 || $spam > 0 ) {
   144 	$spammed = isset($_GET['spammed']) ? (int) $_GET['spammed'] : 0;
       
   145 	$unspammed = isset($_GET['unspammed']) ? (int) $_GET['unspammed'] : 0;
       
   146 
       
   147 	if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 ) {
   114 		echo '<div id="moderated" class="updated fade"><p>';
   148 		echo '<div id="moderated" class="updated fade"><p>';
   115 
   149 
   116 		if ( $approved > 0 ) {
   150 		if ( $approved > 0 ) {
   117 			printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
   151 			printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
   118 			echo '<br />';
   152 			echo '<br />';
   119 		}
   153 		}
   120 
   154 		if ( $spammed > 0 ) {
       
   155 			printf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed );
       
   156 			$ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
       
   157 			echo ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
       
   158 		}
       
   159 		if ( $unspammed > 0 ) {
       
   160 			printf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed );
       
   161 			echo '<br />';
       
   162 		}
       
   163 		if ( $trashed > 0 ) {
       
   164 			printf( _n( '%s comment moved to the trash.', '%s comments moved to the trash.', $trashed ), $trashed );
       
   165 			$ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
       
   166 			echo ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
       
   167 		}
       
   168 		if ( $untrashed > 0 ) {
       
   169 			printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed );
       
   170 			echo '<br />';
       
   171 		}
   121 		if ( $deleted > 0 ) {
   172 		if ( $deleted > 0 ) {
   122 			printf( _n( '%s comment deleted', '%s comments deleted', $deleted ), $deleted );
   173 			printf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted );
   123 			echo '<br />';
       
   124 		}
       
   125 
       
   126 		if ( $spam > 0 ) {
       
   127 			printf( _n( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam );
       
   128 			echo '<br />';
   174 			echo '<br />';
   129 		}
   175 		}
   130 
   176 
   131 		echo '</p></div>';
   177 		echo '</p></div>';
   132 	}
   178 	}
   140 $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
   186 $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
   141 //, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
   187 //, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
   142 //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
   188 //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
   143 $stati = array(
   189 $stati = array(
   144 		'all' => _n_noop('All', 'All'), // singular not used
   190 		'all' => _n_noop('All', 'All'), // singular not used
   145 		'moderated' => _n_noop('Pending (<span class="pending-count">%s</span>)', 'Pending (<span class="pending-count">%s</span>)'),
   191 		'moderated' => _n_noop('Pending <span class="count">(<span class="pending-count">%s</span>)</span>', 'Pending <span class="count">(<span class="pending-count">%s</span>)</span>'),
   146 		'approved' => _n_noop('Approved', 'Approved'), // singular not used
   192 		'approved' => _n_noop('Approved', 'Approved'), // singular not used
   147 		'spam' => _n_noop('Spam (<span class="spam-count">%s</span>)', 'Spam (<span class="spam-count">%s</span>)')
   193 		'spam' => _n_noop('Spam <span class="count">(<span class="spam-count">%s</span>)</span>', 'Spam <span class="count">(<span class="spam-count">%s</span>)</span>'),
       
   194 		'trash' => _n_noop('Trash <span class="count">(<span class="trash-count">%s</span>)</span>', 'Trash <span class="count">(<span class="trash-count">%s</span>)</span>')
   148 	);
   195 	);
       
   196 
       
   197 if ( !EMPTY_TRASH_DAYS )
       
   198 	unset($stati['trash']);
       
   199 
   149 $link = 'edit-comments.php';
   200 $link = 'edit-comments.php';
   150 if ( !empty($comment_type) && 'all' != $comment_type )
   201 if ( !empty($comment_type) && 'all' != $comment_type )
   151 	$link = add_query_arg( 'comment_type', $comment_type, $link );
   202 	$link = add_query_arg( 'comment_type', $comment_type, $link );
       
   203 
   152 foreach ( $stati as $status => $label ) {
   204 foreach ( $stati as $status => $label ) {
   153 	$class = '';
   205 	$class = '';
   154 
   206 
   155 	if ( $status == $comment_status )
   207 	if ( $status == $comment_status )
   156 		$class = ' class="current"';
   208 		$class = ' class="current"';
   182 	<input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
   234 	<input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
   183 	<input type="submit" value="<?php esc_attr_e( 'Search Comments' ); ?>" class="button" />
   235 	<input type="submit" value="<?php esc_attr_e( 'Search Comments' ); ?>" class="button" />
   184 </p>
   236 </p>
   185 
   237 
   186 <?php
   238 <?php
   187 $comments_per_page = get_user_option('edit_comments_per_page');
   239 $comments_per_page = (int) get_user_option( 'edit_comments_per_page', 0, false );
   188 if ( empty($comments_per_page) )
   240 if ( empty( $comments_per_page ) || $comments_per_page < 1 )
   189 	$comments_per_page = 20;
   241 	$comments_per_page = 20;
   190 $comments_per_page = apply_filters('comments_per_page', $comments_per_page, $comment_status);
   242 $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
   191 
   243 
   192 if ( isset( $_GET['apage'] ) )
   244 if ( isset( $_GET['apage'] ) )
   193 	$page = abs( (int) $_GET['apage'] );
   245 	$page = abs( (int) $_GET['apage'] );
   194 else
   246 else
   195 	$page = 1;
   247 	$page = 1;
   250 <option value="unapprove"><?php _e('Unapprove'); ?></option>
   302 <option value="unapprove"><?php _e('Unapprove'); ?></option>
   251 <?php endif; ?>
   303 <?php endif; ?>
   252 <?php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ): ?>
   304 <?php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ): ?>
   253 <option value="approve"><?php _e('Approve'); ?></option>
   305 <option value="approve"><?php _e('Approve'); ?></option>
   254 <?php endif; ?>
   306 <?php endif; ?>
   255 <?php if ( 'spam' != $comment_status ): ?>
   307 <?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?>
   256 <option value="markspam"><?php _e('Mark as Spam'); ?></option>
   308 <option value="spam"><?php _e('Mark as Spam'); ?></option>
   257 <?php endif; ?>
   309 <?php endif; ?>
   258 <option value="delete"><?php _e('Delete'); ?></option>
   310 <?php if ( 'trash' == $comment_status ): ?>
       
   311 <option value="untrash"><?php _e('Restore'); ?></option>
       
   312 <?php elseif ( 'spam' == $comment_status ): ?>
       
   313 <option value="unspam"><?php _e('Not Spam'); ?></option>
       
   314 <?php endif; ?>
       
   315 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
       
   316 <option value="delete"><?php _e('Delete Permanently'); ?></option>
       
   317 <?php else: ?>
       
   318 <option value="trash"><?php _e('Move to Trash'); ?></option>
       
   319 <?php endif; ?>
   259 </select>
   320 </select>
   260 <input type="submit" name="doaction" id="doaction" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" />
   321 <input type="submit" name="doaction" id="doaction" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" />
   261 <?php wp_nonce_field('bulk-comments'); ?>
   322 <?php wp_nonce_field('bulk-comments'); ?>
   262 
   323 
   263 <select name="comment_type">
   324 <select name="comment_type">
   279 
   340 
   280 <?php if ( isset($_GET['apage']) ) { ?>
   341 <?php if ( isset($_GET['apage']) ) { ?>
   281 	<input type="hidden" name="apage" value="<?php echo esc_attr( absint( $_GET['apage'] ) ); ?>" />
   342 	<input type="hidden" name="apage" value="<?php echo esc_attr( absint( $_GET['apage'] ) ); ?>" />
   282 <?php }
   343 <?php }
   283 
   344 
   284 if ( 'spam' == $comment_status ) {
   345 if ( ( 'spam' == $comment_status || 'trash' == $comment_status) && current_user_can ('moderate_comments') ) {
   285 	wp_nonce_field('bulk-spam-delete', '_spam_nonce');
   346 	wp_nonce_field('bulk-destroy', '_destroy_nonce');
   286         if ( current_user_can ('moderate_comments')) { ?>
   347     if ( 'spam' == $comment_status && current_user_can('moderate_comments') ) { ?>
   287 		<input type="submit" name="delete_all_spam" value="<?php esc_attr_e('Delete All Spam'); ?>" class="button-secondary apply" />
   348 		<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
   288 <?php	}
   349 <?php } elseif ( 'trash' == $comment_status && current_user_can('moderate_comments') ) { ?>
       
   350 		<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
       
   351 <?php }
   289 } ?>
   352 } ?>
   290 <?php do_action('manage_comments_nav', $comment_status); ?>
   353 <?php do_action('manage_comments_nav', $comment_status); ?>
   291 </div>
   354 </div>
   292 
   355 
   293 <br class="clear" />
   356 <br class="clear" />
   337 <option value="unapprove"><?php _e('Unapprove'); ?></option>
   400 <option value="unapprove"><?php _e('Unapprove'); ?></option>
   338 <?php endif; ?>
   401 <?php endif; ?>
   339 <?php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ): ?>
   402 <?php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ): ?>
   340 <option value="approve"><?php _e('Approve'); ?></option>
   403 <option value="approve"><?php _e('Approve'); ?></option>
   341 <?php endif; ?>
   404 <?php endif; ?>
   342 <?php if ( 'spam' != $comment_status ): ?>
   405 <?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?>
   343 <option value="markspam"><?php _e('Mark as Spam'); ?></option>
   406 <option value="spam"><?php _e('Mark as Spam'); ?></option>
   344 <?php endif; ?>
   407 <?php endif; ?>
   345 <option value="delete"><?php _e('Delete'); ?></option>
   408 <?php if ( 'trash' == $comment_status ): ?>
       
   409 <option value="untrash"><?php _e('Restore'); ?></option>
       
   410 <?php endif; ?>
       
   411 <?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
       
   412 <option value="delete"><?php _e('Delete Permanently'); ?></option>
       
   413 <?php elseif ( 'spam' == $comment_status ): ?>
       
   414 <option value="unspam"><?php _e('Not Spam'); ?></option>
       
   415 <?php else: ?>
       
   416 <option value="trash"><?php _e('Move to Trash'); ?></option>
       
   417 <?php endif; ?>
   346 </select>
   418 </select>
   347 <input type="submit" name="doaction2" id="doaction2" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" />
   419 <input type="submit" name="doaction2" id="doaction2" value="<?php esc_attr_e('Apply'); ?>" class="button-secondary apply" />
   348 
   420 
   349 <?php if ( 'spam' == $comment_status ) { ?>
   421 <?php if ( 'spam' == $comment_status && current_user_can('moderate_comments') ) { ?>
   350 <input type="submit" name="delete_all_spam2" value="<?php esc_attr_e('Delete All Spam'); ?>" class="button-secondary apply" />
   422 <input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Spam'); ?>" class="button-secondary apply" />
       
   423 <?php } elseif ( 'trash' == $comment_status && current_user_can('moderate_comments') ) { ?>
       
   424 <input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" />
   351 <?php } ?>
   425 <?php } ?>
   352 <?php do_action('manage_comments_nav', $comment_status); ?>
   426 <?php do_action('manage_comments_nav', $comment_status); ?>
   353 </div>
   427 </div>
   354 
   428 
   355 <br class="clear" />
   429 <br class="clear" />
   381 <?php } ?>
   455 <?php } ?>
   382 </div>
   456 </div>
   383 
   457 
   384 <?php
   458 <?php
   385 wp_comment_reply('-1', true, 'detail');
   459 wp_comment_reply('-1', true, 'detail');
       
   460 wp_comment_trashnotice();
   386 include('admin-footer.php'); ?>
   461 include('admin-footer.php'); ?>