Yoast\WP\SEO\Conditionals

Yoast_Admin_And_Dashboard_Conditional::on_upgrade_page()privateYoast 1.0

Checks if we are on a theme or plugin upgrade page.

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

Хуков нет.

Возвращает

true|false. Whether we are on a theme or plugin upgrade page.

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

// private - только в коде основоного (родительского) класса
$result = $this->on_upgrade_page();

Код Yoast_Admin_And_Dashboard_Conditional::on_upgrade_page() Yoast 24.0

private function on_upgrade_page() {
	/*
	 * IFRAME_REQUEST is not defined on these pages,
	 * though these action pages do show when upgrading themes or plugins.
	 */
	$actions = [ 'do-theme-upgrade', 'do-plugin-upgrade', 'do-core-upgrade', 'do-core-reinstall' ];
	return isset( $_GET['action'] ) && \in_array( $_GET['action'], $actions, true );
}