From dfc46541728e324a6ccac988d0e5c08ccf1f56e4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 9 Oct 2015 04:26:24 +0000 Subject: [PATCH] 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 --- wp-admin/includes/dashboard.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index e7716c1fe9..8585234d8b 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 336c80b9e7..2e76f0d5a6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.