Dashboard: Display year in Activity widget if the post date year is not the same as the current one.
Props GaryJ, chriscct7. Fixes #26502. git-svn-id: https://develop.svn.wordpress.org/trunk@34980 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b39b5b8758
commit
fc966fd45d
@ -780,6 +780,9 @@ function wp_dashboard_recent_posts( $args ) {
|
||||
$relative = __( 'Today' );
|
||||
} elseif ( date( 'Y-m-d', $time ) == $tomorrow ) {
|
||||
$relative = __( 'Tomorrow' );
|
||||
} elseif ( date( 'Y', $time ) !== date( 'Y', current_time( 'timestamp' ) ) ) {
|
||||
/* translators: date and time format for recent posts on the dashboard, from a different calendar year, see http://php.net/date */
|
||||
$relative = date_i18n( __( 'M jS Y' ), $time );
|
||||
} else {
|
||||
/* translators: date and time format for recent posts on the dashboard, see http://php.net/date */
|
||||
$relative = date_i18n( __( 'M jS' ), $time );
|
||||
|
Loading…
Reference in New Issue
Block a user