[wp-trac] [WordPress Trac] #63835: Admin pages listing displays post time instead of modified time for posts with status not equal "published"

WordPress Trac noreply at wordpress.org
Sun Aug 17 09:02:22 UTC 2025


#63835: Admin pages listing displays post time instead of modified time for posts
with status not equal "published"
----------------------------+-----------------------------
 Reporter:  gchriz          |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  6.8.2
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 In the admin pages listing (table) the "Date" column displays a wrong date
 for pages with another post_status than "published": eg. "modified",
 "draft", "private".

 For modified pages it correctly displays the label "Last Modified" but the
 wrong **post** time instead of the expected **modified** time.

 Reason:

 In file `wp-admin/includes/class-wp-posts-list-table.php` in line 1222 the
 label/status is set, but the $t_time from some lines above is still the
 post time.

 Suggested fix:

 Change from this

 {{{
                 } else {
                         $status = __( 'Last Modified' );
                 }
 }}}

 to this, retrieving the modified date in this case:

 {{{
                 } else {
                         $status = __( 'Last Modified' );
                         $t_time = sprintf(
                                 /* translators: 1: Modified date, 2:
 Modified time. */
                                 __( '%1$s at %2$s' ),
                                 /* translators: Modified date format. See
 https://www.php.net/manual/datetime.format.php */
                                 get_the_modified_time( __( 'Y/m/d' ),
 $post ),
                                 /* translators: Modified time format. See
 https://www.php.net/manual/datetime.format.php */
                                 get_the_modified_time( __( 'g:i a' ),
 $post )
                         );
                 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63835>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list