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/list-table.php

    r38470 r42343  
    2323    $core_classes = array(
    2424        //Site Admin
    25         'WP_Posts_List_Table' => 'posts',
    26         'WP_Media_List_Table' => 'media',
    27         'WP_Terms_List_Table' => 'terms',
    28         'WP_Users_List_Table' => 'users',
    29         'WP_Comments_List_Table' => 'comments',
    30         'WP_Post_Comments_List_Table' => array( 'comments', 'post-comments' ),
    31         'WP_Links_List_Table' => 'links',
     25        'WP_Posts_List_Table'          => 'posts',
     26        'WP_Media_List_Table'          => 'media',
     27        'WP_Terms_List_Table'          => 'terms',
     28        'WP_Users_List_Table'          => 'users',
     29        'WP_Comments_List_Table'       => 'comments',
     30        'WP_Post_Comments_List_Table'  => array( 'comments', 'post-comments' ),
     31        'WP_Links_List_Table'          => 'links',
    3232        'WP_Plugin_Install_List_Table' => 'plugin-install',
    33         'WP_Themes_List_Table' => 'themes',
    34         'WP_Theme_Install_List_Table' => array( 'themes', 'theme-install' ),
    35         'WP_Plugins_List_Table' => 'plugins',
     33        'WP_Themes_List_Table'         => 'themes',
     34        'WP_Theme_Install_List_Table'  => array( 'themes', 'theme-install' ),
     35        'WP_Plugins_List_Table'        => 'plugins',
    3636        // Network Admin
    37         'WP_MS_Sites_List_Table' => 'ms-sites',
    38         'WP_MS_Users_List_Table' => 'ms-users',
    39         'WP_MS_Themes_List_Table' => 'ms-themes',
     37        'WP_MS_Sites_List_Table'       => 'ms-sites',
     38        'WP_MS_Users_List_Table'       => 'ms-users',
     39        'WP_MS_Themes_List_Table'      => 'ms-themes',
    4040    );
    4141
    4242    if ( isset( $core_classes[ $class ] ) ) {
    43         foreach ( (array) $core_classes[ $class ] as $required )
     43        foreach ( (array) $core_classes[ $class ] as $required ) {
    4444            require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' );
     45        }
    4546
    46         if ( isset( $args['screen'] ) )
     47        if ( isset( $args['screen'] ) ) {
    4748            $args['screen'] = convert_to_screen( $args['screen'] );
    48         elseif ( isset( $GLOBALS['hook_suffix'] ) )
     49        } elseif ( isset( $GLOBALS['hook_suffix'] ) ) {
    4950            $args['screen'] = get_current_screen();
    50         else
     51        } else {
    5152            $args['screen'] = null;
     53        }
    5254
    5355        return new $class( $args );
     
    6668 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
    6769 */
    68 function register_column_headers($screen, $columns) {
     70function register_column_headers( $screen, $columns ) {
    6971    new _WP_List_Table_Compat( $screen, $columns );
    7072}
     
    7981 */
    8082function print_column_headers( $screen, $with_id = true ) {
    81     $wp_list_table = new _WP_List_Table_Compat($screen);
     83    $wp_list_table = new _WP_List_Table_Compat( $screen );
    8284
    8385    $wp_list_table->print_column_headers( $with_id );
Note: See TracChangeset for help on using the changeset viewer.