Skip to content

Commit

Permalink
Changed the way that the status on the calendar is made
Browse files Browse the repository at this point in the history
All I did was to replace the timesince function with the human_time_diff function from WordPress. This way, the time difference is automatically created.
  • Loading branch information
raduconst committed Jan 22, 2018
1 parent 28bc64c commit 8f2fef2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/story-budget/story-budget.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,7 @@ function term_column_default( $post, $column_name, $parent_term ) {
return $output;
break;
case 'post_modified':
$modified_time_gmt = strtotime( $post->post_modified_gmt . " GMT" );
return $this->timesince( $modified_time_gmt );
return sprintf( esc_html__( '%s ago', 'edit-flow' ), human_time_diff( get_the_time( 'U', $post->ID ), current_time( 'timestamp' ) ) );
break;
default:
break;
Expand Down

0 comments on commit 8f2fef2

Please sign in to comment.