WP_Comments_List_Table::column_date()publicWP 1.0

Метод класса: WP_Comments_List_Table{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Comments_List_Table = new WP_Comments_List_Table();
$WP_Comments_List_Table->column_date( $comment );
$comment(WP_Comment) (обязательный)
The comment object.

Код WP_Comments_List_Table::column_date() WP 6.4.3

public function column_date( $comment ) {
	$submitted = sprintf(
		/* translators: 1: Comment date, 2: Comment time. */
		__( '%1$s at %2$s' ),
		/* translators: Comment date format. See https://www.php.net/manual/datetime.format.php */
		get_comment_date( __( 'Y/m/d' ), $comment ),
		/* translators: Comment time format. See https://www.php.net/manual/datetime.format.php */
		get_comment_date( __( 'g:i a' ), $comment )
	);

	echo '<div class="submitted-on">';

	if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
		printf(
			'<a href="%s">%s</a>',
			esc_url( get_comment_link( $comment ) ),
			$submitted
		);
	} else {
		echo $submitted;
	}

	echo '</div>';
}