equal
deleted
inserted
replaced
8 */ |
8 */ |
9 |
9 |
10 /** |
10 /** |
11 * Fetches an instance of a WP_List_Table class. |
11 * Fetches an instance of a WP_List_Table class. |
12 * |
12 * |
13 * @access private |
|
14 * @since 3.1.0 |
13 * @since 3.1.0 |
15 * |
14 * |
16 * @global string $hook_suffix |
15 * @global string $hook_suffix |
17 * |
16 * |
18 * @param string $class_name The type of the list table, which is the class name. |
17 * @param string $class_name The type of the list table, which is the class name. |
56 $args['screen'] = get_current_screen(); |
55 $args['screen'] = get_current_screen(); |
57 } else { |
56 } else { |
58 $args['screen'] = null; |
57 $args['screen'] = null; |
59 } |
58 } |
60 |
59 |
|
60 /** |
|
61 * Filters the list table class to instantiate. |
|
62 * |
|
63 * @since 6.1.0 |
|
64 * |
|
65 * @param string $class_name The list table class to use. |
|
66 * @param array $args An array containing _get_list_table() arguments. |
|
67 */ |
|
68 $custom_class_name = apply_filters( 'wp_list_table_class_name', $class_name, $args ); |
|
69 |
|
70 if ( is_string( $custom_class_name ) && class_exists( $custom_class_name ) ) { |
|
71 $class_name = $custom_class_name; |
|
72 } |
|
73 |
61 return new $class_name( $args ); |
74 return new $class_name( $args ); |
62 } |
75 } |
63 |
76 |
64 return false; |
77 return false; |
65 } |
78 } |