Opened 10 years ago
Closed 7 years ago
#38669 closed enhancement (fixed)
Standardize "found in trash" messages
| Reported by: | Presskopp | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | ui-copy |
Description
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)
Change History (17)
#2
@
10 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.' ); } } }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
"No media files found." and "No comments found." are also used when there are no items yet or a search result is empty.