Yoast\WP\SEO\MyYoast_Client\User_Interface

Integrations_Page_Script_Data::presentpublicYoast 1.0

Returns the MyYoast connection payload, or null when the feature flag is disabled so the Integrations page can omit the key entirely.

The callbackOutcome slot is populated (and consumed) when an OAuth callback finished for this user since the last time the Integrations page was rendered, so the React app can surface a one-shot notification.

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

Хуков нет.

Возвращает

Массив{initialStatus:. array{is_provisioned: bool, is_registered: bool, registered_at: int|null, registered_at_iso: string|null, redirect_uris: array<int, array{uri: string, origin: string, is_verified: bool}>, redirect_uris_match: bool}, callbackOutcome: array{kind: string, key: string}|null, linkParams: array<string, string>, startConnection: bool, endpoints: array<string, string>}|null

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

$Integrations_Page_Script_Data = new Integrations_Page_Script_Data();
$Integrations_Page_Script_Data->present(): ?array;

Код Integrations_Page_Script_Data::present() Yoast 28.3

public function present(): ?array {
	if ( ! $this->myyoast_connection_conditional->is_met() ) {
		return null;
	}

	return [
		'initialStatus'   => $this->status_presenter->present(),
		'callbackOutcome' => $this->consume_callback_outcome(),
		'linkParams'      => $this->short_link_helper->get_query_params(),
		'startConnection' => $this->should_auto_start_connection(),
		'endpoints'       => $this->endpoints_repository->get_all_endpoints()->to_paths_array(),
	];
}