get_current_screen

Advertisement

Summery Summery

Get the current screen object

Syntax Syntax

get_current_screen()

Return Return

(WP_Screen|null) Current screen object or null when screen not defined.

Source Source

File: wp-admin/includes/screen.php

function get_current_screen() {
	global $current_screen;

	if ( ! isset( $current_screen ) ) {
		return null;
	}

	return $current_screen;
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply