Skip to content

Commit

Permalink
Block dir API: Change time difference string. (#17535)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soean authored Oct 10, 2019
1 parent b53c820 commit 99ffdc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/class-wp-rest-block-directory-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ private static function parse_block_metadata( $plugin ) {
$block->assets[] = 'https://plugins.svn.wordpress.org/' . $plugin['slug'] . $asset;
}

$block->humanized_updated = human_time_diff( strtotime( $plugin['last_updated'] ), current_time( 'timestamp' ) ) . __( ' ago', 'gutenberg' );
$block->humanized_updated = sprintf(
/* translators: %s: Human-readable time difference. */
__( '%s ago', 'gutenberg' ),
human_time_diff( strtotime( $plugin['last_updated'] ), current_time( 'timestamp' ) )
);

return $block;
}
Expand Down

0 comments on commit 99ffdc1

Please sign in to comment.