Skip to content

Instantly share code, notes, and snippets.

@robincornett
Last active August 21, 2019 14:55
Show Gist options
  • Save robincornett/0b2969cad55d6706c3fb02694fe532ea to your computer and use it in GitHub Desktop.
Save robincornett/0b2969cad55d6706c3fb02694fe532ea to your computer and use it in GitHub Desktop.
Update Genesis comments to include only the date, not the time, the comment was posted.
<?php
// Completely remove the date and time from comments.
add_filter( 'genesis_show_comment_date', '__return_false' );
<?php
add_filter( 'genesis_markup_comment-time-link_content', 'leaven_remove_comment_time' );
/**
* Remove time from comments.
* @return string
*/
function leaven_remove_comment_time() {
return get_comment_date();
}
<?php
// Note: This code is copied directly from the Genesis Framework, markup.php file, lines 131-141.
/**
* Contextual filter to modify 'content'.
*
* @since 2.6.0
*
* @param string $content Content being passed through Markup API.
* @param array $args Array with markup arguments.
*
* @see genesis_markup $args Array.
*/
$content = apply_filters( "genesis_markup_{$args['context']}_content", $args['content'], $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment