Ticket #38341: 38341.2.diff
File 38341.2.diff, 2.0 KB (added by , 8 years ago) |
---|
-
class-wp-comments-list-table.php
354 354 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); 355 355 } 356 356 357 if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) ) {357 if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $this->has_items() ) { 358 358 wp_nonce_field( 'bulk-destroy', '_destroy_nonce' ); 359 359 $title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); 360 360 submit_button( $title, 'apply', 'delete_all', false ); -
class-wp-media-list-table.php
177 177 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); 178 178 } 179 179 180 if ( $this->is_trash && current_user_can( 'edit_others_posts' ) ) {180 if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { 181 181 submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); 182 182 } ?> 183 183 </div> -
class-wp-posts-list-table.php
488 488 } 489 489 } 490 490 491 if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) {491 if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) { 492 492 submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); 493 493 } 494 494 ?>