Make WordPress Core

Changeset 34980


Ignore:
Timestamp:
10/09/2015 04:25:23 AM (9 years ago)
Author:
SergeyBiryukov
Message:

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

Props GaryJ, chriscct7.
Fixes #26502.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r34912 r34980  
    781781            } elseif ( date( 'Y-m-d', $time ) == $tomorrow ) {
    782782                $relative = __( 'Tomorrow' );
     783            } elseif ( date( 'Y', $time ) !== date( 'Y', current_time( 'timestamp' ) ) ) {
     784                /* translators: date and time format for recent posts on the dashboard, from a different calendar year, see http://php.net/date */
     785                $relative = date_i18n( __( 'M jS Y' ), $time );
    783786            } else {
    784787                /* translators: date and time format for recent posts on the dashboard, see http://php.net/date */
Note: See TracChangeset for help on using the changeset viewer.