WP_Screen::set_current_screen
Makes the screen object the current screen.
Method of the class: WP_Screen{}
Hooks from the method
Returns
null. Nothing (null).
Usage
$WP_Screen = new WP_Screen(); $WP_Screen->set_current_screen();
Notes
- See: set_current_screen()
- Global. WP_Screen.
$current_screenWordPress current screen object. - Global. String.
$typenowThe post type of the current screen. - Global. String.
$taxnowThe taxonomy of the current screen.
Changelog
| Since 3.3.0 | Introduced. |
WP_Screen::set_current_screen() WP Screen::set current screen code WP 7.0
public function set_current_screen() {
global $current_screen, $taxnow, $typenow;
$current_screen = $this;
$typenow = $this->post_type;
$taxnow = $this->taxonomy;
/**
* Fires after the current screen has been set.
*
* @since 3.0.0
*
* @param WP_Screen $current_screen Current WP_Screen object.
*/
do_action( 'current_screen', $current_screen );
}