Make WordPress Core

Opened 3 years ago

Last modified 6 weeks ago

#38669 reviewing defect (bug)

Standardize "found in trash" messages

Reported by: Presskopp Owned by: desrosj
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Text Changes Keywords: has-patch
Focuses: Cc:
PR Number:


Currently, we use the following strings, if trash is empty:

No pages found in Trash. (wp-includes/post.php:1375)
No posts found in Trash. (wp-includes/post.php:1375)
No media files found. (wp-includes/media.php:3451)
No comments found. (wp-admin/includes/class-wp-comments-list-table.php:189)

There's also a new string coming with 4.7:
No changesets found in Trash. (wp-includes/post.php:167)

We should either strip the "in Trash" part or add it to the ones where it's missing.

related: #38341 (there's a screenshot)

Attachments (5)

38669.diff (1.2 KB) - added by Presskopp 3 years ago.
38669.2.diff (521 bytes) - added by Presskopp 3 years ago.
38669.3.diff (1.0 KB) - added by Presskopp 3 years ago.
38669.4.diff (996 bytes) - added by Presskopp 21 months ago.
38669.5.diff (972 bytes) - added by Presskopp 16 months ago.
Refreshing (and testing)

Download all attachments as: .zip

Change History (13)

#1 @ocean90
3 years ago

  • Version trunk deleted

"No media files found." and "No comments found." are also used when there are no items yet or a search result is empty.

#2 @Presskopp
3 years ago

What do you think of an approach like this (example: class-wp-comments-list-table.php)?

        public function no_items() {
                global $comment_status;

                if ( 'moderated' === $comment_status ) {
                        _e( 'No comments awaiting moderation.' );
                } else { 
                        if ( 'trash' === $comment_status ) {
                                _e( 'No comments found in Trash.' );
                        } else {
                        _e( 'No comments found.' ); }

3 years ago

#3 @Presskopp
3 years ago

this could be leading to a working patch..

3 years ago

#4 @Presskopp
3 years ago

trying to meet the coding standards

3 years ago

#5 @Presskopp
3 years ago

failed - try again

#6 @Presskopp
21 months ago

  • Keywords has-patch added

21 months ago

This ticket was mentioned in Slack in #core by presskopp. View the logs.

20 months ago

16 months ago

Refreshing (and testing)

#8 @desrosj
6 weeks ago

  • Milestone changed from Awaiting Review to 5.4
  • Owner set to desrosj
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.