GC_Comments_List_Table::single_row()

最后更新于:2021-11-26 22:35:46

GC_Comments_List_Table::single_row( GC_Comment$item)

参数

$item

(GC_Comment) (Required)

源文件

文件: gc-admin/includes/class-gc-comments-list-table.php

	public function single_row( $item ) {
		global $post, $comment;

		$comment = $item;

		$the_comment_class = gc_get_comment_status( $comment );

		if ( ! $the_comment_class ) {
			$the_comment_class = '';
		}

		$the_comment_class = implode( ' ', get_comment_class( $the_comment_class, $comment, $comment->comment_post_ID ) );

		if ( $comment->comment_post_ID > 0 ) {
			$post = get_post( $comment->comment_post_ID );
		}

		$this->user_can = current_user_can( 'edit_comment', $comment->comment_ID );

		echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>";
		$this->single_row_columns( $comment );
		echo "</tr>n";

		unset( $GLOBALS['post'], $GLOBALS['comment'] );
	}