~canonical-sysadmins/wordpress/4.7

« back to all changes in this revision

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

  • Committer: Haw Loeung
  • Date: 2016-12-13 06:56:21 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: haw.loeung@canonical.com-20161213065621-8tcu7u7vlxgs2s81
Merge WP4.7 from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
 
95
95
                $comments_per_page = $this->get_per_page( $comment_status );
96
96
 
97
 
                $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
 
97
                $doing_ajax = wp_doing_ajax();
98
98
 
99
99
                if ( isset( $_REQUEST['number'] ) ) {
100
100
                        $number = (int) $_REQUEST['number'];
351
351
                         * @since 3.5.0
352
352
                         */
353
353
                        do_action( 'restrict_manage_comments' );
354
 
                        submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
 
354
                        submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
355
355
                }
356
356
 
357
357
                if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) ) {
600
600
                        ( ( ( 'approve' === $action || 'unapprove' === $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
601
601
 
602
602
                        // Reply and quickedit need a hide-if-no-js span when not added with ajax
603
 
                        if ( ( 'reply' === $action || 'quickedit' === $action ) && ! defined('DOING_AJAX') )
 
603
                        if ( ( 'reply' === $action || 'quickedit' === $action ) && ! wp_doing_ajax() )
604
604
                                $action .= ' hide-if-no-js';
605
605
                        elseif ( ( $action === 'untrash' && $the_comment_status === 'trash' ) || ( $action === 'unspam' && $the_comment_status === 'spam' ) ) {
606
606
                                if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )