Created
September 16, 2019 14:25
-
-
Save termitkin/c96e17a681dcf97751553f96ff2c17e5 to your computer and use it in GitHub Desktop.
[WordPress] Comment date to format %count_days% ago
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
function pressfore_comment_time_output($date, $d, $comment){ | |
return sprintf( _x('%s ago', '%s = human-readable time difference'), human_time_diff(get_comment_time('U'), current_time('timestamp'))); | |
} | |
add_filter('get_comment_date', 'pressfore_comment_time_output', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment