Make WordPress Core


Ignore:
Timestamp:
01/16/2011 09:47:24 PM (12 years ago)
Author:
nacin
Message:

Remove AJAX from list tables. first pass. see #16262.

File:
1 edited

Legend:

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

    r17293 r17322  
    1111 * Fetch an instance of a WP_List_Table class.
    1212 *
     13 * @access private
    1314 * @since 3.1.0
    1415 *
    15  * @param string $class The type of the list table, which is the class name except for core list tables.
     16 * @param string $class The type of the list table, which is the class name.
    1617 * @return object|bool Object on success, false if the class does not exist.
    1718 */
    18 function get_list_table( $class ) {
    19     $class = apply_filters( "get_list_table_$class", $class );
    20 
    21     require_list_table( $class );
    22 
    23     if ( class_exists( $class ) )
    24         return new $class;
    25     return false;
    26 }
    27 
    28 /**
    29  * Include the proper file for a core list table.
    30  *
    31  * Useful for extending a core class that would not otherwise be required.
    32  *
    33  * @since 3.1.0
    34  *
    35  * @param string $table The core table to include.
    36  * @return bool True on success, false on failure.
    37  */
    38 function require_list_table( $class ) {
     19function _get_list_table( $class ) {
    3920    $core_classes = array(
    4021        //Site Admin
     
    5839    if ( isset( $core_classes[ $class ] ) ) {
    5940        require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $core_classes[ $class ] . '-list-table.php' );
    60         return true;
     41        return new $class;
    6142    }
    6243
Note: See TracChangeset for help on using the changeset viewer.