WordPress at Your Fingertips
function is not described

WP_Screen::set_current_screen() public WP 3.3.0

Makes the screen object the current screen.

{} It's a method of the class: WP_Screen{}

Hooks from the method

Return

null. Nothing.

Usage

$WP_Screen = new WP_Screen();
$WP_Screen->set_current_screen();

Notes

  • See: set_current_screen()
  • Global. WP_Screen. $current_screen WordPress current screen object.
  • Global. String. $taxnow
  • Global. String. $typenow

Changelog

Since 3.3.0 Introduced.

Code of WP_Screen::set_current_screen() WP 5.8.2

public function set_current_screen() {
	global $current_screen, $taxnow, $typenow;
	$current_screen = $this;
	$taxnow         = $this->taxonomy;
	$typenow        = $this->post_type;

	/**
	 * 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 );
}