On this page
set_current_screen( string|WP_Screen $hook_name = '' )
Set the current screen object
Parameters
$hook_namestring|WP_Screen Optional-
The hook name (also known as the hook suffix) used to determine the screen, or an existing screen object.
Default:
''
Source
File: wp-admin/includes/screen.php. View all references
function set_current_screen( $hook_name = '' ) {
WP_Screen::get( $hook_name )->set_current_screen();
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Screen::get() wp-admin/includes/class-wp-screen.php | Fetches a screen object. |
Used By
| Used By | Description |
|---|---|
| wp_ajax_search_install_plugins() wp-admin/includes/ajax-actions.php | Ajax handler for searching plugins to install. |
| wp_ajax_search_plugins() wp-admin/includes/ajax-actions.php | Ajax handler for searching plugins. |
| wp_ajax_dashboard_widgets() wp-admin/includes/ajax-actions.php | Ajax handler for dashboard widgets. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/set_current_screen