Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (9 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-list-table-compat.php

    r41161 r42343  
    1818
    1919        public function __construct( $screen, $columns = array() ) {
    20                 if ( is_string( $screen ) )
     20                if ( is_string( $screen ) ) {
    2121                        $screen = convert_to_screen( $screen );
     22                }
    2223
    2324                $this->_screen = $screen;
    2425
    25                 if ( !empty( $columns ) ) {
     26                if ( ! empty( $columns ) ) {
    2627                        $this->_columns = $columns;
    2728                        add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 );
     
    3031
    3132        /**
    32          *
    3333         * @return array
    3434         */
    3535        protected function get_column_info() {
    36                 $columns = get_column_headers( $this->_screen );
    37                 $hidden = get_hidden_columns( $this->_screen );
     36                $columns  = get_column_headers( $this->_screen );
     37                $hidden   = get_hidden_columns( $this->_screen );
    3838                $sortable = array();
    39                 $primary = $this->get_default_primary_column_name();
     39                $primary  = $this->get_default_primary_column_name();
    4040
    4141                return array( $columns, $hidden, $sortable, $primary );
     
    4343
    4444        /**
    45          *
    4645         * @return array
    4746         */
Note: See TracChangeset for help on using the changeset viewer.