Yoast\WP\SEO\MyYoast_Client\User_Interface
Management_Route::respond_with_connection_status
Builds a successful response carrying the refreshed status payload.
Метод класса: Management_Route{}
Хуков нет.
Возвращает
WP_REST_Response.
Использование
// private - только в коде основоного (родительского) класса $result = $this->respond_with_connection_status( $status, ?string $message_key ): WP_REST_Response;
- $status(int) (обязательный)
- The HTTP status.
- ?string $message_key(обязательный)
- .
Код Management_Route::respond_with_connection_status() Management Route::respond with connection status Yoast 28.3
private function respond_with_connection_status( int $status, ?string $message_key ): WP_REST_Response {
$body = [
'status' => $this->status_presenter->present(),
];
if ( $message_key !== null ) {
$body['message_key'] = $message_key;
}
return new WP_REST_Response( $body, $status );
}