I'd like to format the time-ago date format from 5 min to 5m. I can edit the formatting.php file and make the edit but should I? Should I instead declare the edit in the functions.php file?
From the formatting.php file:
function human_time_diff( $from, $to = '' ) {
if ( empty( $to ) ) {
$to = time();
}
$diff = (int) abs( $to - $from );
if ( $diff < HOUR_IN_SECONDS ) {
$mins = round( $diff / MINUTE_IN_SECONDS );
if ( $mins <= 1 )
$mins = 1;
/* translators: Time difference between two dates, in minutes (min=minute). 1: Number of minutes */
$since = sprintf( _n( '%s min', '%s min', $mins ), $mins );
}
As you can see in the last time, I can change '%s min' to '%sm' which does the trick. If WordPress discourages editing the formatting.php file, how would I make this edit in functions.php?