WP_Comments_List_Table::column_date( WP_Comment $comment )


Description Description


Parameters Parameters

$comment

(WP_Comment) (Required) The comment object.


Top ↑

Source Source

File: wp-admin/includes/class-wp-comments-list-table.php

	public function column_date( $comment ) {
		/* translators: 1: comment date, 2: comment time */
		$submitted = sprintf(
			__( '%1$s at %2$s' ),
			/* translators: comment date format. See https://secure.php.net/date */
			get_comment_date( __( 'Y/m/d' ), $comment ),
			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>';
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.