]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-comments-list-table.php
WordPress 4.7
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-comments-list-table.php
index 116a55e06f721e459a16967938c7c01db972ee6d..37a2e751a90c2ae8d4040d798829b81f59af1770 100644 (file)
@@ -94,7 +94,7 @@ class WP_Comments_List_Table extends WP_List_Table {
 
                $comments_per_page = $this->get_per_page( $comment_status );
 
-               $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
+               $doing_ajax = wp_doing_ajax();
 
                if ( isset( $_REQUEST['number'] ) ) {
                        $number = (int) $_REQUEST['number'];
@@ -351,7 +351,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                         * @since 3.5.0
                         */
                        do_action( 'restrict_manage_comments' );
-                       submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
+                       submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
                }
 
                if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) ) {
@@ -600,7 +600,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                        ( ( ( 'approve' === $action || 'unapprove' === $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
 
                        // Reply and quickedit need a hide-if-no-js span when not added with ajax
-                       if ( ( 'reply' === $action || 'quickedit' === $action ) && ! defined('DOING_AJAX') )
+                       if ( ( 'reply' === $action || 'quickedit' === $action ) && ! wp_doing_ajax() )
                                $action .= ' hide-if-no-js';
                        elseif ( ( $action === 'untrash' && $the_comment_status === 'trash' ) || ( $action === 'unspam' && $the_comment_status === 'spam' ) ) {
                                if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) )