Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Allows developer to control whether to print the comment date.
*
* @since 2.2.0
*
* @param boolean $comment_date Whether to print the comment date
* @param string $post_type The current post type
*/
$comment_date = apply_filters( 'genesis_show_comment_date', true, get_post_type() );
if ( $comment_date ) {
printf( '<p %s>', genesis_attr( 'comment-meta' ) );
printf( '<time %s>', genesis_attr( 'comment-time' ) );
printf( '<a href="%s" %s>', esc_url( get_comment_link( $comment->comment_ID ) ), genesis_attr( 'comment-time-link' ) );
echo esc_html( get_comment_date() ) . ' ' . __( 'at', 'genesis' ) . ' ' . esc_html( get_comment_time() );
echo '</a></time></p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.