W3cubDocs

/WordPress

get_current_screen()

Get the current screen object

Return

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

Source

File: wp-admin/includes/screen.php

function get_current_screen() {
	global $current_screen;

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

	return $current_screen;
}

Changelog

Version Description
3.1.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_current_screen