Changeset 21914 for trunk/wp-admin/includes/list-table.php
- Timestamp:
- 09/19/2012 12:43:31 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/list-table.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/list-table.php
r20094 r21914 15 15 * 16 16 * @param string $class The type of the list table, which is the class name. 17 * @param array $args Optional. Arguments to pass to the class. Accepts 'screen'. 17 18 * @return object|bool Object on success, false if the class does not exist. 18 19 */ 19 function _get_list_table( $class ) {20 function _get_list_table( $class, $args = array() ) { 20 21 $core_classes = array( 21 22 //Site Admin … … 40 41 foreach ( (array) $core_classes[ $class ] as $required ) 41 42 require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' ); 42 return new $class; 43 44 if ( isset( $args['screen'] ) ) 45 $args['screen'] = convert_to_screen( $args['screen'] ); 46 else 47 $args['screen'] = get_current_screen(); 48 49 return new $class( $args ); 43 50 } 44 51
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)