~canonical-sysadmins/wordpress/4.9.6

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-comments-list-table.php

  • Committer: Barry Price
  • Date: 2017-08-04 10:16:14 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: barry.price@canonical.com-20170804101614-i19f3u3hxgsxypn0
Merge WP4.8.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
         */
320
320
        protected function extra_tablenav( $which ) {
321
321
                global $comment_status, $comment_type;
 
322
                static $has_items;
 
323
 
 
324
                if ( ! isset( $has_items ) ) {
 
325
                        $has_items = $this->has_items();
 
326
                }
322
327
?>
323
328
                <div class="alignleft actions">
324
329
<?php
354
359
                        submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
355
360
                }
356
361
 
357
 
                if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $this->has_items() ) {
 
362
                if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $has_items ) {
358
363
                        wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
359
364
                        $title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
360
365
                        submit_button( $title, 'apply', 'delete_all', false );