2003-10-27 08:09:25 +01:00
< ? php
2008-08-16 09:27:34 +02:00
/**
* Edit Comments Administration Panel .
*
* @ package WordPress
* @ subpackage Administration
*/
/** WordPress Administration Bootstrap */
2004-10-19 05:03:06 +02:00
require_once ( 'admin.php' );
2004-04-23 05:23:05 +02:00
2008-11-12 10:35:50 +01:00
wp_enqueue_script ( 'admin-comments' );
2008-10-17 00:23:32 +02:00
enqueue_comment_hotkeys_js ();
2004-08-23 01:24:50 +02:00
2008-12-06 04:59:03 +01:00
$post_id = isset ( $_REQUEST [ 'p' ]) ? ( int ) $_REQUEST [ 'p' ] : 0 ;
2008-10-31 19:02:20 +01:00
if ( ( isset ( $_REQUEST [ 'delete_all_spam' ] ) || isset ( $_REQUEST [ 'delete_all_spam2' ] ) ) && ! empty ( $_REQUEST [ 'pagegen_timestamp' ] ) ) {
2008-10-17 21:55:51 +02:00
check_admin_referer ( 'bulk-spam-delete' , '_spam_nonce' );
2008-09-29 11:26:21 +02:00
2008-10-31 19:02:20 +01:00
$delete_time = $wpdb -> escape ( $_REQUEST [ 'pagegen_timestamp' ] );
2008-12-30 19:30:55 +01:00
if ( current_user_can ( 'moderate_comments' )) {
$deleted_spam = $wpdb -> query ( " DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND ' $delete_time ' > comment_date_gmt " );
} else {
$deleted_spam = 0 ;
}
2008-12-09 19:03:31 +01:00
$redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . ( int ) $deleted_spam ;
2008-12-06 04:59:03 +01:00
if ( $post_id )
$redirect_to = add_query_arg ( 'p' , absint ( $post_id ), $redirect_to );
wp_redirect ( $redirect_to );
2008-10-17 21:55:51 +02:00
} elseif ( isset ( $_REQUEST [ 'delete_comments' ]) && isset ( $_REQUEST [ 'action' ]) && ( - 1 != $_REQUEST [ 'action' ] || - 1 != $_REQUEST [ 'action2' ] ) ) {
2006-05-03 00:36:06 +02:00
check_admin_referer ( 'bulk-comments' );
2008-09-29 11:26:21 +02:00
$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 ;
2008-12-06 04:59:03 +01:00
$_post_id = ( int ) $wpdb -> get_var ( $wpdb -> prepare ( " SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d " , $comment_id ) );
2006-03-31 01:12:54 +02:00
2008-12-06 04:59:03 +01:00
if ( ! current_user_can ( 'edit_post' , $_post_id ) )
2008-02-24 03:33:30 +01:00
continue ;
2008-09-29 11:26:21 +02:00
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 ;
2006-02-14 21:09:13 +01:00
}
2004-07-08 03:10:50 +02:00
endforeach ;
2008-09-29 11:26:21 +02:00
$redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved ;
2008-12-06 04:59:03 +01:00
if ( $post_id )
$redirect_to = add_query_arg ( 'p' , absint ( $post_id ), $redirect_to );
2008-07-26 05:51:39 +02:00
if ( isset ( $_REQUEST [ 'apage' ]) )
$redirect_to = add_query_arg ( 'apage' , absint ( $_REQUEST [ 'apage' ]), $redirect_to );
2008-02-24 21:28:36 +01:00
if ( ! empty ( $_REQUEST [ 'mode' ]) )
$redirect_to = add_query_arg ( 'mode' , $_REQUEST [ 'mode' ], $redirect_to );
if ( ! empty ( $_REQUEST [ 'comment_status' ]) )
$redirect_to = add_query_arg ( 'comment_status' , $_REQUEST [ 'comment_status' ], $redirect_to );
if ( ! empty ( $_REQUEST [ 's' ]) )
$redirect_to = add_query_arg ( 's' , $_REQUEST [ 's' ], $redirect_to );
wp_redirect ( $redirect_to );
2008-09-29 11:26:21 +02:00
} 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' ]) ) );
2008-03-02 21:17:30 +01:00
exit ;
2008-02-24 21:28:36 +01:00
}
2004-02-17 11:50:33 +01:00
2008-11-20 05:51:47 +01:00
if ( $post_id )
$title = sprintf ( __ ( 'Edit Comments on “%s”' ), wp_html_excerpt ( _draft_or_post_title ( $post_id ), 50 ));
else
$title = __ ( 'Edit Comments' );
2008-02-23 09:01:51 +01:00
require_once ( 'admin-header.php' );
2008-02-24 05:51:47 +01:00
2009-05-05 21:43:53 +02:00
$mode = ( ! isset ( $_GET [ 'mode' ]) || empty ( $_GET [ 'mode' ]) ) ? 'detail' : esc_attr ( $_GET [ 'mode' ]);
2008-02-24 21:28:36 +01:00
2009-05-07 09:38:14 +02:00
$comment_status = isset ( $_REQUEST [ 'comment_status' ]) ? $_REQUEST [ 'comment_status' ] : 'all' ;
2009-04-21 23:12:01 +02:00
if ( ! in_array ( $comment_status , array ( 'all' , 'moderated' , 'approved' , 'spam' )) )
$comment_status = 'all' ;
2008-10-01 17:48:45 +02:00
2009-05-05 21:43:53 +02:00
$comment_type = ! empty ( $_GET [ 'comment_type' ]) ? esc_attr ( $_GET [ 'comment_type' ]) : '' ;
2008-02-28 07:50:25 +01:00
2008-08-24 08:56:22 +02:00
$search_dirty = ( isset ( $_GET [ 's' ]) ) ? $_GET [ 's' ] : '' ;
2009-05-05 21:43:53 +02:00
$search = esc_attr ( $search_dirty ); ?>
2008-09-08 23:49:26 +02:00
2008-11-05 20:48:43 +01:00
< div class = " wrap " >
2008-11-26 14:51:25 +01:00
< ? php screen_icon (); ?>
2008-12-04 13:01:02 +01:00
< h2 >< ? php echo wp_specialchars ( $title );
if ( isset ( $_GET [ 's' ]) && $_GET [ 's' ] )
2008-12-06 04:59:03 +01:00
printf ( '<span class="subtitle">' . sprintf ( __ ( 'Search results for “%s”' ), wp_html_excerpt ( wp_specialchars ( stripslashes ( $_GET [ 's' ] ) ), 50 ) ) . '</span>' ); ?>
2008-12-04 13:01:02 +01:00
</ h2 >
2008-11-05 20:48:43 +01:00
2008-09-28 06:11:27 +02:00
< ? php
2008-02-24 03:33:30 +01:00
if ( isset ( $_GET [ 'approved' ] ) || isset ( $_GET [ 'deleted' ] ) || isset ( $_GET [ 'spam' ] ) ) {
$approved = isset ( $_GET [ 'approved' ] ) ? ( int ) $_GET [ 'approved' ] : 0 ;
$deleted = isset ( $_GET [ 'deleted' ] ) ? ( int ) $_GET [ 'deleted' ] : 0 ;
$spam = isset ( $_GET [ 'spam' ] ) ? ( int ) $_GET [ 'spam' ] : 0 ;
if ( $approved > 0 || $deleted > 0 || $spam > 0 ) {
echo '<div id="moderated" class="updated fade"><p>' ;
if ( $approved > 0 ) {
2009-02-20 20:22:34 +01:00
printf ( _n ( '%s comment approved' , '%s comments approved' , $approved ), $approved );
2008-02-24 03:33:30 +01:00
echo '<br />' ;
}
if ( $deleted > 0 ) {
2009-02-20 20:22:34 +01:00
printf ( _n ( '%s comment deleted' , '%s comments deleted' , $deleted ), $deleted );
2008-02-24 03:33:30 +01:00
echo '<br />' ;
}
if ( $spam > 0 ) {
2009-02-20 20:22:34 +01:00
printf ( _n ( '%s comment marked as spam' , '%s comments marked as spam' , $spam ), $spam );
2008-02-24 03:33:30 +01:00
echo '<br />' ;
}
echo '</p></div>' ;
}
}
?>
2008-09-29 11:26:21 +02:00
2008-10-31 19:02:20 +01:00
< form id = " comments-form " action = " " method = " get " >
2008-02-25 01:28:21 +01:00
< ul class = " subsubsub " >
< ? php
$status_links = array ();
2008-12-06 04:59:03 +01:00
$num_comments = ( $post_id ) ? wp_count_comments ( $post_id ) : wp_count_comments ();
2008-11-06 22:56:29 +01:00
//, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
//, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
2008-08-20 06:06:36 +02:00
$stati = array (
2009-02-20 20:22:34 +01:00
'all' => _n_noop ( 'All' , 'All' ), // singular not used
'moderated' => _n_noop ( 'Pending (<span class="pending-count">%s</span>)' , 'Pending (<span class="pending-count">%s</span>)' ),
'approved' => _n_noop ( 'Approved' , 'Approved' ), // singular not used
'spam' => _n_noop ( 'Spam (<span class="spam-count">%s</span>)' , 'Spam (<span class="spam-count">%s</span>)' )
2008-08-20 06:06:36 +02:00
);
2008-12-06 04:59:03 +01:00
$link = 'edit-comments.php' ;
if ( ! empty ( $comment_type ) && 'all' != $comment_type )
$link = add_query_arg ( 'comment_type' , $comment_type , $link );
2008-02-25 01:28:21 +01:00
foreach ( $stati as $status => $label ) {
$class = '' ;
2009-04-21 23:12:01 +02:00
if ( $status == $comment_status )
2008-02-25 01:28:21 +01:00
$class = ' class="current"' ;
2008-11-06 22:56:29 +01:00
if ( ! isset ( $num_comments -> $status ) )
$num_comments -> $status = 10 ;
2009-04-21 23:12:01 +02:00
$link = add_query_arg ( 'comment_status' , $status , $link );
2008-12-06 04:59:03 +01:00
if ( $post_id )
$link = add_query_arg ( 'p' , absint ( $post_id ), $link );
/*
// I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
if ( ! empty ( $_GET [ 's' ] ) )
2009-05-05 21:43:53 +02:00
$link = add_query_arg ( 's' , esc_attr ( stripslashes ( $_GET [ 's' ] ) ), $link );
2008-12-06 04:59:03 +01:00
*/
$status_links [] = " <li class=' $status '><a href=' $link ' $class > " . sprintf (
2009-02-20 20:22:34 +01:00
_n ( $label [ 0 ], $label [ 1 ], $num_comments -> $status ),
2008-11-06 22:56:29 +01:00
number_format_i18n ( $num_comments -> $status )
) . '</a>' ;
2008-02-25 01:28:21 +01:00
}
2008-03-11 08:23:07 +01:00
$status_links = apply_filters ( 'comment_status_links' , $status_links );
2008-11-06 22:56:29 +01:00
echo implode ( " |</li> \n " , $status_links ) . '</li>' ;
2008-02-25 01:28:21 +01:00
unset ( $status_links );
?>
</ ul >
2008-02-24 03:33:30 +01:00
2008-10-03 02:13:12 +02:00
< p class = " search-box " >
2009-05-13 00:40:56 +02:00
< label class = " screen-reader-text " for = " comment-search-input " >< ? php _e ( 'Search Comments' ); ?> :</label>
2009-04-16 06:41:05 +02:00
< input type = " text " id = " comment-search-input " name = " s " value = " <?php _admin_search_query(); ?> " />
2009-05-05 21:43:53 +02:00
< input type = " submit " value = " <?php esc_attr_e( 'Search Comments' ); ?> " class = " button " />
2008-10-02 20:03:45 +02:00
</ p >
2008-02-23 09:01:51 +01:00
< ? php
2009-03-27 23:47:47 +01:00
$comments_per_page = get_user_option ( 'edit_comments_per_page' );
if ( empty ( $comments_per_page ) )
$comments_per_page = 20 ;
$comments_per_page = apply_filters ( 'comments_per_page' , $comments_per_page , $comment_status );
2008-04-30 22:05:25 +02:00
2007-03-27 23:20:16 +02:00
if ( isset ( $_GET [ 'apage' ] ) )
2007-08-01 21:41:44 +02:00
$page = abs ( ( int ) $_GET [ 'apage' ] );
2007-03-27 23:20:16 +02:00
else
$page = 1 ;
2007-05-21 14:52:44 +02:00
2008-04-30 22:05:25 +02:00
$start = $offset = ( $page - 1 ) * $comments_per_page ;
2004-10-05 09:25:21 +02:00
2008-10-01 17:48:45 +02:00
list ( $_comments , $total ) = _wp_get_comment_list ( $comment_status , $search_dirty , $start , $comments_per_page + 5 , $post_id , $comment_type ); // Grab a few extra
2006-11-18 07:52:01 +01:00
2008-12-07 08:10:47 +01:00
$_comment_post_ids = array ();
foreach ( $_comments as $_c ) {
$_comment_post_ids [] = $_c -> comment_post_ID ;
}
$_comment_pending_count_temp = ( array ) get_pending_comments_num ( $_comment_post_ids );
foreach ( ( array ) $_comment_post_ids as $_cpid )
$_comment_pending_count [ $_cpid ] = isset ( $_comment_pending_count_temp [ $_cpid ] ) ? $_comment_pending_count_temp [ $_cpid ] : 0 ;
if ( empty ( $_comment_pending_count ) )
$_comment_pending_count = array ();
2008-04-30 22:05:25 +02:00
$comments = array_slice ( $_comments , 0 , $comments_per_page );
$extra_comments = array_slice ( $_comments , $comments_per_page );
2007-03-27 23:20:16 +02:00
$page_links = paginate_links ( array (
2007-09-04 01:32:58 +02:00
'base' => add_query_arg ( 'apage' , '%#%' ),
2007-05-21 14:52:44 +02:00
'format' => '' ,
2008-11-27 01:28:24 +01:00
'prev_text' => __ ( '«' ),
'next_text' => __ ( '»' ),
2008-04-30 22:05:25 +02:00
'total' => ceil ( $total / $comments_per_page ),
2007-03-27 23:20:16 +02:00
'current' => $page
));
2008-02-23 09:01:51 +01:00
?>
2006-11-18 07:52:01 +01:00
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " mode " value = " <?php echo esc_attr( $mode ); ?> " />
2008-12-06 04:59:03 +01:00
< ? php if ( $post_id ) : ?>
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " p " value = " <?php echo esc_attr( intval( $post_id ) ); ?> " />
2008-12-06 04:59:03 +01:00
< ? php endif ; ?>
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " comment_status " value = " <?php echo esc_attr( $comment_status ); ?> " />
< input type = " hidden " name = " pagegen_timestamp " value = " <?php echo esc_attr(current_time('mysql', 1)); ?> " />
2008-02-28 07:50:25 +01:00
2008-02-23 09:01:51 +01:00
< div class = " tablenav " >
2006-04-19 10:30:56 +02:00
2008-11-06 22:56:29 +01:00
< ? php if ( $page_links ) : ?>
2008-11-10 18:42:51 +01:00
< div class = " tablenav-pages " >< ? php $page_links_text = sprintf ( '<span class="displaying-num">' . __ ( 'Displaying %s–%s of %s' ) . '</span>%s' ,
2008-11-06 22:56:29 +01:00
number_format_i18n ( $start + 1 ),
number_format_i18n ( min ( $page * $comments_per_page , $total ) ),
2008-12-14 13:13:30 +01:00
'<span class="total-type-count">' . number_format_i18n ( $total ) . '</span>' ,
2008-11-06 22:56:29 +01:00
$page_links
); echo $page_links_text ; ?> </div>
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " _total " value = " <?php echo esc_attr( $total ); ?> " />
< input type = " hidden " name = " _per_page " value = " <?php echo esc_attr( $comments_per_page ); ?> " />
< input type = " hidden " name = " _page " value = " <?php echo esc_attr( $page ); ?> " />
2008-11-06 22:56:29 +01:00
< ? php endif ; ?>
2008-02-23 09:01:51 +01:00
2008-10-24 20:25:46 +02:00
< div class = " alignleft actions " >
2008-08-20 06:06:36 +02:00
< select name = " action " >
2008-12-10 03:27:08 +01:00
< option value = " -1 " selected = " selected " >< ? php _e ( 'Bulk Actions' ) ?> </option>
2009-04-21 23:12:01 +02:00
< ? php if ( 'all' == $comment_status || 'approved' == $comment_status ) : ?>
2008-08-20 06:06:36 +02:00
< option value = " unapprove " >< ? php _e ( 'Unapprove' ); ?> </option>
2008-09-04 20:00:21 +02:00
< ? php endif ; ?>
2009-04-21 23:12:01 +02:00
< ? php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ) : ?>
2008-08-29 00:09:56 +02:00
< option value = " approve " >< ? php _e ( 'Approve' ); ?> </option>
2008-02-24 21:42:44 +01:00
< ? php endif ; ?>
2008-08-20 06:06:36 +02:00
< ? php if ( 'spam' != $comment_status ) : ?>
< option value = " markspam " >< ? php _e ( 'Mark as Spam' ); ?> </option>
2008-02-28 08:04:52 +01:00
< ? php endif ; ?>
2008-08-20 06:06:36 +02:00
< option value = " delete " >< ? php _e ( 'Delete' ); ?> </option>
</ select >
2009-05-05 21:43:53 +02:00
< input type = " submit " name = " doaction " id = " doaction " value = " <?php esc_attr_e('Apply'); ?> " class = " button-secondary apply " />
2008-02-23 09:01:51 +01:00
< ? php wp_nonce_field ( 'bulk-comments' ); ?>
2008-10-24 20:25:46 +02:00
< select name = " comment_type " >
< option value = " all " >< ? php _e ( 'Show all comment types' ); ?> </option>
< ? php
$comment_types = apply_filters ( 'admin_comment_types_dropdown' , array (
'comment' => __ ( 'Comments' ),
'pings' => __ ( 'Pings' ),
) );
foreach ( $comment_types as $type => $label ) {
2009-05-05 21:43:53 +02:00
echo " <option value=' " . esc_attr ( $type ) . " ' " ;
2008-10-24 20:25:46 +02:00
selected ( $comment_type , $type );
echo " > $label </option> \n " ;
}
?>
</ select >
2009-05-05 21:43:53 +02:00
< input type = " submit " id = " post-query-submit " value = " <?php esc_attr_e('Filter'); ?> " class = " button-secondary " />
2008-10-24 20:25:46 +02:00
2008-07-26 05:51:39 +02:00
< ? php if ( isset ( $_GET [ 'apage' ]) ) { ?>
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " apage " value = " <?php echo esc_attr( absint( $_GET['apage'] ) ); ?> " />
2008-09-08 23:49:26 +02:00
< ? php }
2008-09-29 11:26:21 +02:00
if ( 'spam' == $comment_status ) {
2009-03-18 03:43:45 +01:00
wp_nonce_field ( 'bulk-spam-delete' , '_spam_nonce' );
2008-12-30 19:30:55 +01:00
if ( current_user_can ( 'moderate_comments' )) { ?>
2009-05-05 21:43:53 +02:00
< input type = " submit " name = " delete_all_spam " value = " <?php esc_attr_e('Delete All Spam'); ?> " class = " button-secondary apply " />
2008-12-30 19:30:55 +01:00
< ? php }
} ?>
2008-09-10 01:14:37 +02:00
< ? php do_action ( 'manage_comments_nav' , $comment_status ); ?>
2007-03-27 23:20:16 +02:00
</ div >
2004-10-05 09:25:21 +02:00
2008-03-15 00:58:31 +01:00
< br class = " clear " />
2008-02-23 09:01:51 +01:00
</ div >
2005-08-31 04:39:17 +02:00
2008-10-03 02:13:12 +02:00
< div class = " clear " ></ div >
2008-09-29 11:26:21 +02:00
< ? php if ( $comments ) { ?>
2008-11-17 19:01:00 +01:00
< table class = " widefat comments fixed " cellspacing = " 0 " >
2008-10-30 16:50:21 +01:00
< thead >
< tr >
2008-11-17 20:16:26 +01:00
< ? php print_column_headers ( 'edit-comments' ); ?>
2008-10-30 16:50:21 +01:00
</ tr >
</ thead >
< tfoot >
< tr >
2008-11-17 20:16:26 +01:00
< ? php print_column_headers ( 'edit-comments' , false ); ?>
2008-10-30 16:50:21 +01:00
</ tr >
</ tfoot >
< tbody id = " the-comment-list " class = " list:comment " >
2008-02-23 09:01:51 +01:00
< ? php
2008-02-28 07:50:25 +01:00
foreach ( $comments as $comment )
2008-02-28 23:12:04 +01:00
_wp_comment_row ( $comment -> comment_ID , $mode , $comment_status );
2004-02-17 09:35:04 +01:00
?>
2008-10-30 16:50:21 +01:00
</ tbody >
< tbody id = " the-extra-comment-list " class = " list:comment " style = " display: none; " >
2008-02-28 07:50:25 +01:00
< ? php
foreach ( $extra_comments as $comment )
2008-02-28 23:12:04 +01:00
_wp_comment_row ( $comment -> comment_ID , $mode , $comment_status );
2008-02-28 07:50:25 +01:00
?>
2008-10-30 16:50:21 +01:00
</ tbody >
</ table >
2008-02-23 09:01:51 +01:00
2008-09-29 11:26:21 +02:00
< div class = " tablenav " >
< ? php
if ( $page_links )
2008-11-06 22:56:29 +01:00
echo " <div class='tablenav-pages'> $page_links_text </div> " ;
2008-09-29 11:26:21 +02:00
?>
2008-10-24 20:25:46 +02:00
< div class = " alignleft actions " >
2008-09-29 11:26:21 +02:00
< select name = " action2 " >
2008-12-10 03:27:08 +01:00
< option value = " -1 " selected = " selected " >< ? php _e ( 'Bulk Actions' ) ?> </option>
2009-04-21 23:12:01 +02:00
< ? php if ( 'all' == $comment_status || 'approved' == $comment_status ) : ?>
2008-09-29 11:26:21 +02:00
< option value = " unapprove " >< ? php _e ( 'Unapprove' ); ?> </option>
< ? php endif ; ?>
2009-04-21 23:12:01 +02:00
< ? php if ( 'all' == $comment_status || 'moderated' == $comment_status || 'spam' == $comment_status ) : ?>
2008-09-29 11:26:21 +02:00
< 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 >
2009-05-05 21:43:53 +02:00
< input type = " submit " name = " doaction2 " id = " doaction2 " value = " <?php esc_attr_e('Apply'); ?> " class = " button-secondary apply " />
2008-09-29 11:26:21 +02:00
< ? php if ( 'spam' == $comment_status ) { ?>
2009-05-05 21:43:53 +02:00
< input type = " submit " name = " delete_all_spam2 " value = " <?php esc_attr_e('Delete All Spam'); ?> " class = " button-secondary apply " />
2008-09-29 11:26:21 +02:00
< ? php } ?>
< ? php do_action ( 'manage_comments_nav' , $comment_status ); ?>
</ div >
< br class = " clear " />
</ div >
2008-02-28 07:50:25 +01:00
</ form >
< form id = " get-extra-comments " method = " post " action = " " class = " add:the-extra-comment-list: " style = " display: none; " >
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " s " value = " <?php echo esc_attr( $search ); ?> " />
< input type = " hidden " name = " mode " value = " <?php echo esc_attr( $mode ); ?> " />
< input type = " hidden " name = " comment_status " value = " <?php echo esc_attr( $comment_status ); ?> " />
2008-02-28 07:50:25 +01:00
< input type = " hidden " name = " page " value = " <?php echo isset( $_REQUEST['page'] ) ? absint( $_REQUEST['page'] ) : 1; ?> " />
2009-05-05 21:43:53 +02:00
< input type = " hidden " name = " p " value = " <?php echo esc_attr( $post_id ); ?> " />
< input type = " hidden " name = " comment_type " value = " <?php echo esc_attr( $comment_type ); ?> " />
2008-02-28 07:50:25 +01:00
< ? php wp_nonce_field ( 'add-comment' , '_ajax_nonce' , false ); ?>
</ form >
2006-03-29 03:51:55 +02:00
< div id = " ajax-response " ></ div >
2003-10-27 08:09:25 +01:00
2009-04-21 23:12:01 +02:00
< ? php } elseif ( 'moderated' == $comment_status ) { ?>
2008-11-20 01:16:41 +01:00
< p >< ? php _e ( 'No comments awaiting moderation… yet.' ) ?> </p>
</ form >
< ? php } else { ?>
< p >< ? php _e ( 'No results found.' ) ?> </p>
</ form >
< ? php } ?>
2008-02-28 07:50:25 +01:00
</ div >
2008-08-24 08:56:22 +02:00
< ? php
2008-10-30 16:50:21 +01:00
wp_comment_reply ( '-1' , true , 'detail' );
2008-08-29 00:09:56 +02:00
include ( 'admin-footer.php' ); ?>