public $pending_count = array();
+ public $extra_items;
+
+ private $user_can;
+
/**
* Constructor.
*
</tr>
</thead>
- <tfoot>
- <tr>
- <?php $this->print_column_headers( false ); ?>
- </tr>
- </tfoot>
-
<tbody id="the-comment-list" data-wp-lists="list:comment">
<?php $this->display_rows_or_placeholder(); ?>
</tbody>
<tbody id="the-extra-comment-list" data-wp-lists="list:comment" style="display: none;">
<?php $this->items = $this->extra_items; $this->display_rows(); ?>
</tbody>
+
+ <tfoot>
+ <tr>
+ <?php $this->print_column_headers( false ); ?>
+ </tr>
+ </tfoot>
+
</table>
<?php
$comment = $a_comment;
$the_comment_class = wp_get_comment_status( $comment->comment_ID );
+ if ( ! $the_comment_class ) {
+ $the_comment_class = '';
+ }
$the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment->comment_ID, $comment->comment_post_ID ) );
$post = get_post( $comment->comment_post_ID );
global $comment_status;
$post = get_post();
- $user_can = $this->user_can;
-
$comment_url = esc_url( get_comment_link( $comment->comment_ID ) );
$the_comment_status = wp_get_comment_status( $comment->comment_ID );
- if ( $user_can ) {
+ if ( $this->user_can ) {
$del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
$approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
echo '</div>';
comment_text();
- if ( $user_can ) { ?>
+ if ( $this->user_can ) { ?>
<div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden">
<textarea class="comment" rows="1" cols="1"><?php
/** This filter is documented in wp-admin/includes/comment.php */
<?php
}
- if ( $user_can ) {
+ if ( $this->user_can ) {
// Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash.
$actions = array(
'approve' => '', 'unapprove' => '',
// Not looking at all comments.
if ( $comment_status && 'all' != $comment_status ) {
- if ( 'approved' == $the_comment_status )
+ if ( 'approved' == $the_comment_status ) {
$actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved' class='vim-u vim-destructive' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
- else if ( 'unapproved' == $the_comment_status )
+ } elseif ( 'unapproved' == $the_comment_status ) {
$actions['approve'] = "<a href='$approve_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved' class='vim-a vim-destructive' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
+ }
} else {
$actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' class='vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' class='vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
$format = '<a data-comment-id="%d" data-post-id="%d" data-action="%s" class="%s" title="%s" href="#">%s</a>';
- $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick Edit' ), __( 'Quick Edit' ) );
+ $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'edit', 'vim-q comment-inline',esc_attr__( 'Edit this item inline' ), __( 'Quick Edit' ) );
$actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );
}
}
public function column_date() {
- return get_comment_date( __( 'Y/m/d \a\t g:ia' ) );
+ return get_comment_date( __( 'Y/m/d \a\t g:i a' ) );
}
public function column_response() {
class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
protected function get_column_info() {
- $this->_column_headers = array(
+ return array(
array(
- 'author' => __( 'Author' ),
- 'comment' => _x( 'Comment', 'column name' ),
+ 'author' => __( 'Author' ),
+ 'comment' => _x( 'Comment', 'column name' ),
),
array(),
array(),
);
-
- return $this->_column_headers;
}
protected function get_table_classes() {