Make WordPress Core


Ignore:
Timestamp:
11/01/2010 08:37:02 AM (13 years ago)
Author:
westi
Message:

Make the class to filename mapping easier to read.
Ensure that we support PHP4 for now by passing references to objects in list tables code.
See #14579.

File:
1 edited

Legend:

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

    r16113 r16125  
    9090            $this->_screen = convert_to_screen( $this->_screen );
    9191
    92         add_filter( 'manage_' . $this->_screen->id . '_columns', array( $this, 'get_columns' ), 0 );
     92        add_filter( 'manage_' . $this->_screen->id . '_columns', array( &$this, 'get_columns' ), 0 );
    9393
    9494        if ( !$args['plural'] )
     
    9999        if ( $args['ajax'] ) {
    100100            wp_enqueue_script( 'list-table' );
    101             add_action( 'admin_footer', array( $this, '_js_vars' ) );
     101            add_action( 'admin_footer', array( &$this, '_js_vars' ) );
    102102        }
    103103    }
     
    763763            elseif ( method_exists( $this, 'column_' . $column_name ) ) {
    764764                echo "<td $attributes>";
    765                 echo call_user_func( array( $this, 'column_' . $column_name ), $item );
     765                echo call_user_func( array( &$this, 'column_' . $column_name ), $item );
    766766                echo "</td>";
    767767            }
     
    847847 */
    848848function require_list_table( $class ) {
    849     $core_classes = array( 'WP_Posts_Table' => 'posts', 'WP_Media_Table' => 'media', 'WP_Terms_Table' => 'terms',
    850         'WP_Users_Table' => 'users', 'WP_Comments_Table' => 'comments', 'WP_Post_Comments_Table' => 'comments',
    851         'WP_Links_Table' => 'links', 'WP_Sites_Table' => 'sites', 'WP_MS_Users_Table' => 'ms-users',
    852         'WP_Plugins_Table' => 'plugins', 'WP_Plugin_Install_Table' => 'plugin-install', 'WP_Themes_Table' => 'themes',
    853         'WP_Theme_Install_Table' => 'theme-install', 'WP_MS_Themes_Table' => 'ms-themes' );
     849    $core_classes = array(
     850        'WP_Posts_Table' => 'posts',
     851        'WP_Media_Table' => 'media',
     852        'WP_Terms_Table' => 'terms',
     853        'WP_Users_Table' => 'users',
     854        'WP_Comments_Table' => 'comments',
     855        'WP_Post_Comments_Table' => 'comments',
     856        'WP_Links_Table' => 'links',
     857        'WP_Sites_Table' => 'sites',
     858        'WP_MS_Users_Table' => 'ms-users',
     859        'WP_Plugins_Table' => 'plugins',
     860        'WP_Plugin_Install_Table' => 'plugin-install',
     861        'WP_Themes_Table' => 'themes',
     862        'WP_Theme_Install_Table' => 'theme-install',
     863        'WP_MS_Themes_Table' => 'ms-themes',
     864    );
    854865
    855866    if ( isset( $core_classes[ $class ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.