Yoast\WP\SEO\General\User_Interface

General_Page_Integration::get_script_dataprivateYoast 1.0

Creates the script data.

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

Хуков нет.

Возвращает

Массив. The script data.

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

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

Код General_Page_Integration::get_script_data() Yoast 26.9

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',
			],
			'llmTxtEnabled'          => $this->options_helper->get( 'enable_llms_txt', true ),
			'isWooCommerceActive'    => $this->woocommerce_conditional->is_met(),
			'addonsStatus'           => [
				'isWooSeoActive'         => \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) ),
				'isLocalSEOActive'       => \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::LOCAL_SLUG ) ),
				'isNewsSEOActive'        => \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::NEWS_SLUG ) ),
				'isVideoSEOActive'       => \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::VIDEO_SLUG ) ),
				'isDuplicatePostActive'  => \defined( 'DUPLICATE_POST_FILE' ),
			],
		],
		'adminUrl'              => \admin_url( 'admin.php' ),
		'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(),
		'optInNotificationSeen' => [
			'task_list' => $this->is_task_list_opt_in_notification_seen(),
		],
		'taskListConfiguration' => $this->task_list_configuration->get_configuration(),
	];
}