Dashboard: Display year in Activity widget if the post date year is not the same as the current one.

Props GaryJ, chriscct7.
Fixes #26502.
Built from https://develop.svn.wordpress.org/trunk@34980


git-svn-id: http://core.svn.wordpress.org/trunk@34945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-10-09 04:26:24 +00:00
parent 6595b1b080
commit dfc4654172
2 changed files with 4 additions and 1 deletions

View File

@ -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 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34979';
$wp_version = '4.4-alpha-34980';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.