wppaste
WordPress

WP_Screen

Since
3.3.0
Source
wp-admin/includes/class-wp-screen.php:15
Core class used to implement an admin screen API.

Compatibility

WordPress
since 3.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 14

Every hook that fires from inside WP_Screen, in the order it appears in the class, grouped by the method that fires it.

Properties · 20

$actionstringpublic
Any action associated with the screen.
$basestringpublic
The base type of the screen.
$columnsintprivate
The number of columns to display. Access with get_columns().
$idstringpublic
The unique ID of the screen.
$in_adminstringprotected
Which admin the screen is in. network | user | site | false
$is_networkboolpublic
Whether the screen is in the network admin.
$is_userboolpublic
Whether the screen is in the user admin.
$parent_base?stringpublic
The base menu parent.
$parent_file?stringpublic
The parent_file for the screen per the admin menu system.
$post_typestringpublic
The post type associated with the screen, if any.
$taxonomystringpublic
The taxonomy associated with the screen, if any.
$_help_tabsarrayprivate
The help tab data associated with the screen, if any.
$_help_sidebarstringprivate
The help sidebar data associated with screen, if any.
$_screen_reader_contentstring[]private
The accessible hidden headings and text associated with the screen, if any.
$_old_compat_helparrayprivate static
Stores old string-based help.
$_optionsarrayprivate
The screen options associated with screen, if any.
$_registryarrayprivate static
The screen object registry.
$_show_screen_options?boolprivate
Stores the result of the public show_screen_options function.
$_screen_settings?stringprivate
Stores the 'screen_settings' section of screen options.
$is_block_editorboolpublic
Whether the screen is using the block editor.

Methods · 33

Source code

#[AllowDynamicProperties]final class WP_Screen {	/**	 * Any action associated with the screen.	 *	 * 'add' for *-add.php and *-new.php screens. Empty otherwise.	 *	 * @since 3.3.0	 * @var string	 */	public $action; 	/**	 * The base type of the screen.	 *	 * This is typically the same as `$id` but with any post types and taxonomies stripped.	 * For example, for an `$id` of 'edit-post' the base is 'edit'.	 *	 * @since 3.3.0	 * @var string	 */	public $base; 	/**	 * The number of columns to display. Access with get_columns().	 *	 * @since 3.4.0	 * @var int	 */	private $columns = 0; 	/**	 * The unique ID of the screen.	 *	 * @since 3.3.0	 * @var string	 */	public $id; 	/**	 * Which admin the screen is in. network | user | site | false	 *	 * @since 3.5.0	 * @var string	 */	protected $in_admin; 	/**	 * Whether the screen is in the network admin.	 *	 * Deprecated. Use in_admin() instead.	 *	 * @since 3.3.0	 * @deprecated 3.5.0	 * @var bool	 */	public $is_network; 	/**	 * Whether the screen is in the user admin.	 *	 * Deprecated. Use in_admin() instead.	 *	 * @since 3.3.0	 * @deprecated 3.5.0	 * @var bool	 */	public $is_user; 	/**	 * The base menu parent.	 *	 * This is derived from `$parent_file` by removing the query string and any .php extension.	 * `$parent_file` values of 'edit.php?post_type=page' and 'edit.php?post_type=post'	 * have a `$parent_base` of 'edit'.	 *	 * @since 3.3.0	 * @var ?string	 */	public $parent_base;

Changelog

Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/class-wp-screen.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.