mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
List Tables: Hide 'Empty Trash' and 'Empty Spam' buttons when view is already empty.
Props ivantedja, Presskopp, printsachen1, Jaydeep Rami, mathieuhays, cazm. Fixes #38341. git-svn-id: https://develop.svn.wordpress.org/trunk@40297 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -489,7 +489,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) {
|
||||
if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) {
|
||||
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user