Changeset 17322 for trunk/wp-admin/includes/list-table.php
- Timestamp:
- 01/16/2011 09:47:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/list-table.php
r17293 r17322 11 11 * Fetch an instance of a WP_List_Table class. 12 12 * 13 * @access private 13 14 * @since 3.1.0 14 15 * 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. 16 17 * @return object|bool Object on success, false if the class does not exist. 17 18 */ 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 ) { 19 function _get_list_table( $class ) { 39 20 $core_classes = array( 40 21 //Site Admin … … 58 39 if ( isset( $core_classes[ $class ] ) ) { 59 40 require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $core_classes[ $class ] . '-list-table.php' ); 60 return true;41 return new $class; 61 42 } 62 43
Note: See TracChangeset
for help on using the changeset viewer.