WP_Screen::set_current_screen()publicWP 3.3.0

Makes the screen object the current screen.

Метод класса: WP_Screen{}

Хуки из метода

Возвращает

null. Ничего (null).

Использование

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

Заметки

  • Смотрите: set_current_screen()
  • Global. WP_Screen. $current_screen WordPress current screen object.
  • Global. Строка. $typenow The post type of the current screen.
  • Global. Строка. $taxnow The taxonomy of the current screen.

Список изменений

С версии 3.3.0 Введена.

Код WP_Screen::set_current_screen() WP 6.6.2

public function set_current_screen() {
	global $current_screen, $taxnow, $typenow;

	$current_screen = $this;
	$typenow        = $this->post_type;
	$taxnow         = $this->taxonomy;

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