Plugin Author
Tim W
(@timwhitlock)
Use the latest_tweets_render_date
filter to perform your own relative date representation.
https://wordpress.org/plugins/latest-tweets-widget/other_notes/#Theming
Just in case anyone else wants to display the time in this format:
add_filter('latest_tweets_render_date', function( $created_at ){
$date = DateTime::createFromFormat('D M d H:i:s O Y', $created_at );
return sprintf( '%s ' . __( 'ago' ), human_time_diff( $date->format('U') ) );
});
Plugin Author
Tim W
(@timwhitlock)
Nice one. I didn’t know about the human_time_diff function in WordPress.