Make WordPress Core

Ticket #50538: 50538.2.diff

File 50538.2.diff, 1.1 KB (added by SergeyBiryukov, 5 years ago)
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    301301                                $link = remove_query_arg( 'user_id', $link );
    302302                        }
    303303
    304                         if ( ! isset( $num_comments->$status ) ) {
    305                                 $num_comments->$status = 10;
     304                        if ( empty( $num_comments->$status ) ) {
     305                                continue;
    306306                        }
     307
    307308                        $link = add_query_arg( 'comment_status', $status, $link );
    308309                        if ( $post_id ) {
    309310                                $link = add_query_arg( 'p', absint( $post_id ), $link );
    310311                        }
     312
    311313                        /*
    312314                        // I toyed with this, but decided against it. Leaving it in here in case anyone thinks it is a good idea. ~ Mark
    313315                        if ( !empty( $_REQUEST['s'] ) )
    314316                                $link = add_query_arg( 's', esc_attr( wp_unslash( $_REQUEST['s'] ) ), $link );
    315317                        */
     318
    316319                        $status_links[ $status ] = "<a href='$link'$current_link_attributes>" . sprintf(
    317320                                translate_nooped_plural( $label, $num_comments->$status ),
    318321                                sprintf(