Yoast\WP\SEO\MyYoast_Client\User_Interface
Integrations_Page_Script_Data::consume_callback_outcome
Reads and consumes the pending OAuth callback outcome for the current user and shapes it for the React app.
Метод класса: Integrations_Page_Script_Data{}
Хуков нет.
Возвращает
array{kind: string, key: string}|null. The outcome, or null when none is pending.
Использование
// private - только в коде основоного (родительского) класса $result = $this->consume_callback_outcome(): ?array;
Код Integrations_Page_Script_Data::consume_callback_outcome() Integrations Page Script Data::consume callback outcome Yoast 28.9
private function consume_callback_outcome(): ?array {
$outcome = $this->callback_handler->consume_outcome( \get_current_user_id() );
if ( $outcome === null ) {
return null;
}
if ( $outcome->is_success() ) {
return [
'kind' => 'success',
'key' => 'verify_success',
];
}
return [
'kind' => 'error',
'key' => $this->error_message_key( $outcome ),
];
}