WordPress.org

Make WordPress Core

Changeset 16125


Ignore:
Timestamp:
11/01/10 08:37:02 (3 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.

Location:
trunk/wp-admin/includes
Files:
3 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 ] ) ) { 
  • trunk/wp-admin/includes/list-table-ms-themes.php

    r16123 r16125  
    7777        if ( $s ) { 
    7878            $status = 'search'; 
    79             $themes['search'] = array_filter( $themes['all'], array( $this, '_search_callback' ) ); 
     79            $themes['search'] = array_filter( $themes['all'], array( &$this, '_search_callback' ) ); 
    8080        } 
    8181 
     
    9494            $order = strtoupper( $order ); 
    9595 
    96             uasort( $this->items, array( $this, '_order_callback' ) ); 
     96            uasort( $this->items, array( &$this, '_order_callback' ) ); 
    9797        } 
    9898 
  • trunk/wp-admin/includes/list-table-plugins.php

    r16089 r16125  
    110110        if ( $s ) { 
    111111            $status = 'search'; 
    112             $plugins['search'] = array_filter( $plugins['all'], array( $this, '_search_callback' ) ); 
     112            $plugins['search'] = array_filter( $plugins['all'], array( &$this, '_search_callback' ) ); 
    113113        } 
    114114 
     
    127127            $order = strtoupper( $order ); 
    128128 
    129             uasort( $this->items, array( $this, '_order_callback' ) ); 
     129            uasort( $this->items, array( &$this, '_order_callback' ) ); 
    130130        } 
    131131 
Note: See TracChangeset for help on using the changeset viewer.