WordPress at Your Fingertips
function is not described

WP_Screen::set_parentage() public WP 3.3.0

Set the parent information for the screen.

This is called in admin-header.php after the menu parent for the screen has been determined.

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

No Hooks.

Return

null. Nothing.

Usage

$WP_Screen = new WP_Screen();
$WP_Screen->set_parentage( $parent_file );
$parent_file(string) (required)
The parent file of the screen. Typically the $parent_file global.

Changelog

Since 3.3.0 Introduced.

Code of WP_Screen::set_parentage() WP 5.8.2

public function set_parentage( $parent_file ) {
	$this->parent_file         = $parent_file;
	list( $this->parent_base ) = explode( '?', $parent_file );
	$this->parent_base         = str_replace( '.php', '', $this->parent_base );
}