WPSEO_Admin_Pages::init()publicYoast 1.0

Make sure the needed scripts are loaded for admin pages.

{} Это метод класса: WPSEO_Admin_Pages{}

Хуков нет.

Возвращает

null. Ничего.

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

$WPSEO_Admin_Pages = new WPSEO_Admin_Pages();
$WPSEO_Admin_Pages->init();

Код WPSEO_Admin_Pages::init() Yoast 19.7.1

public function init() {
	$page = filter_input( INPUT_GET, 'page' );
	if ( $page === 'wpseo_settings' ) {
		// Bail, this is managed in `Yoast\WP\SEO\Integrations\Settings_Integration`.
		return;
	}

	if ( filter_input( INPUT_GET, 'wpseo_reset_defaults' ) && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wpseo_reset_defaults' ) && current_user_can( 'manage_options' ) ) {
		WPSEO_Options::reset();
	}

	add_action( 'admin_enqueue_scripts', [ $this, 'config_page_scripts' ] );
	add_action( 'admin_enqueue_scripts', [ $this, 'config_page_styles' ] );
}