WordPress at Your Fingertips
function is not described

WP_Comments_List_Table::single_row() public WP 1.0

{} It's a method of the class: WP_Comments_List_Table{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Comments_List_Table = new WP_Comments_List_Table();
$WP_Comments_List_Table->single_row( $item );
$item(WP_Comment) (required)
-

Notes

  • Global. WP_Post. $post Global post object.
  • Global. WP_Comment. $comment Global comment object.

Code of WP_Comments_List_Table::single_row() WP 5.8.2

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

	$comment = $item;

	$the_comment_class = wp_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'] );
}