Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calliaweb/c4167c535836a4cbe9e2 to your computer and use it in GitHub Desktop.
Save calliaweb/c4167c535836a4cbe9e2 to your computer and use it in GitHub Desktop.
<?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