Yoast\WP\SEO\General\User_Interface

General_Page_Integration::get_script_data()privateYoast 1.0

Creates the script data.

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

Хуков нет.

Возвращает

Массив<Строку,Массив<Строку|true|false,Массив<Строку>>>. The script data.

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

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

Код General_Page_Integration::get_script_data() Yoast 24.4

private function get_script_data() {
	return [
		'preferences'       => [
			'isPremium'      => $this->product_helper->is_premium(),
			'isRtl'          => \is_rtl(),
			'pluginUrl'      => \plugins_url( '', \WPSEO_FILE ),
			'upsellSettings' => [
				'actionId'     => 'load-nfd-ctb',
				'premiumCtbId' => 'f6a84663-465f-4cb5-8ba5-f7a6d72224b2',
			],
		],
		'linkParams'        => $this->shortlink_helper->get_query_params(),
		'userEditUrl'       => \add_query_arg( 'user_id', '{user_id}', \admin_url( 'user-edit.php' ) ),
		'alerts'            => $this->notification_helper->get_alerts(),
		'currentPromotions' => $this->promotion_manager->get_current_promotions(),
		'dismissedAlerts'   => $this->alert_dismissal_action->all_dismissed(),
		'dashboard'         => $this->dashboard_configuration->get_configuration(),
	];
}