equal
deleted
inserted
replaced
15 * |
15 * |
16 * @global string $hook_suffix |
16 * @global string $hook_suffix |
17 * |
17 * |
18 * @param string $class The type of the list table, which is the class name. |
18 * @param string $class The type of the list table, which is the class name. |
19 * @param array $args Optional. Arguments to pass to the class. Accepts 'screen'. |
19 * @param array $args Optional. Arguments to pass to the class. Accepts 'screen'. |
20 * @return WP_List_Table|bool List table object on success, false if the class does not exist. |
20 * @return WP_List_Table|false List table object on success, false if the class does not exist. |
21 */ |
21 */ |
22 function _get_list_table( $class, $args = array() ) { |
22 function _get_list_table( $class, $args = array() ) { |
23 $core_classes = array( |
23 $core_classes = array( |
24 // Site Admin. |
24 // Site Admin. |
25 'WP_Posts_List_Table' => 'posts', |
25 'WP_Posts_List_Table' => 'posts', |
31 'WP_Links_List_Table' => 'links', |
31 'WP_Links_List_Table' => 'links', |
32 'WP_Plugin_Install_List_Table' => 'plugin-install', |
32 'WP_Plugin_Install_List_Table' => 'plugin-install', |
33 'WP_Themes_List_Table' => 'themes', |
33 'WP_Themes_List_Table' => 'themes', |
34 'WP_Theme_Install_List_Table' => array( 'themes', 'theme-install' ), |
34 'WP_Theme_Install_List_Table' => array( 'themes', 'theme-install' ), |
35 'WP_Plugins_List_Table' => 'plugins', |
35 'WP_Plugins_List_Table' => 'plugins', |
|
36 'WP_Application_Passwords_List_Table' => 'application-passwords', |
36 |
37 |
37 // Network Admin. |
38 // Network Admin. |
38 'WP_MS_Sites_List_Table' => 'ms-sites', |
39 'WP_MS_Sites_List_Table' => 'ms-sites', |
39 'WP_MS_Users_List_Table' => 'ms-users', |
40 'WP_MS_Users_List_Table' => 'ms-users', |
40 'WP_MS_Themes_List_Table' => 'ms-themes', |
41 'WP_MS_Themes_List_Table' => 'ms-themes', |
68 * |
69 * |
69 * @see get_column_headers(), print_column_headers(), get_hidden_columns() |
70 * @see get_column_headers(), print_column_headers(), get_hidden_columns() |
70 * |
71 * |
71 * @since 2.7.0 |
72 * @since 2.7.0 |
72 * |
73 * |
73 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the |
74 * @param string $screen The handle for the screen to register column headers for. This is |
74 * add_*_page() functions. |
75 * usually the hook name returned by the `add_*_page()` functions. |
75 * @param string[] $columns An array of columns with column IDs as the keys and translated column names as the values. |
76 * @param string[] $columns An array of columns with column IDs as the keys and translated |
|
77 * column names as the values. |
76 */ |
78 */ |
77 function register_column_headers( $screen, $columns ) { |
79 function register_column_headers( $screen, $columns ) { |
78 new _WP_List_Table_Compat( $screen, $columns ); |
80 new _WP_List_Table_Compat( $screen, $columns ); |
79 } |
81 } |
80 |
82 |