Last active
August 21, 2019 14:55
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Completely remove the date and time from comments. | |
add_filter( 'genesis_show_comment_date', '__return_false' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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