Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-post-comments-list-table.php

    r35241 r42343  
    1919
    2020    /**
    21      *
    2221     * @return array
    2322     */
     
    2524        return array(
    2625            array(
    27                 'author'   => __( 'Author' ),
    28                 'comment'  => _x( 'Comment', 'column name' ),
     26                'author'  => __( 'Author' ),
     27                'comment' => _x( 'Comment', 'column name' ),
    2928            ),
    3029            array(),
     
    3534
    3635    /**
    37      *
    3836     * @return array
    3937     */
    4038    protected function get_table_classes() {
    41         $classes = parent::get_table_classes();
     39        $classes   = parent::get_table_classes();
    4240        $classes[] = 'wp-list-table';
    4341        $classes[] = 'comments-box';
     
    4644
    4745    /**
    48      *
    4946     * @param bool $output_empty
    5047     */
     
    5249        $singular = $this->_args['singular'];
    5350
    54         wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
     51        wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
    5552?>
    5653<table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
    57     <tbody id="the-comment-list"<?php
    58         if ( $singular ) {
    59             echo " data-wp-lists='list:$singular'";
    60         } ?>>
    61         <?php if ( ! $output_empty ) {
     54    <tbody id="the-comment-list"
     55    <?php
     56    if ( $singular ) {
     57        echo " data-wp-lists='list:$singular'";
     58    }
     59        ?>
     60        >
     61        <?php
     62        if ( ! $output_empty ) {
    6263            $this->display_rows_or_placeholder();
    63         } ?>
     64        }
     65        ?>
    6466    </tbody>
    6567</table>
     
    6870
    6971    /**
    70      *
    7172     * @param bool $comment_status
    7273     * @return int
Note: See TracChangeset for help on using the changeset viewer.