Yoast\WP\SEO\Routes

SEMrush_Route::authenticate()publicYoast 1.0

Authenticates with SEMrush.

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

Хуков нет.

Возвращает

WP_REST_Response. The response.

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

$SEMrush_Route = new SEMrush_Route();
$SEMrush_Route->authenticate( $request );
$request(WP_REST_Request) (обязательный)
The request. This request should have a code param set.

Код SEMrush_Route::authenticate() Yoast 19.11

public function authenticate( WP_REST_Request $request ) {
	$data = $this
		->login_action
		->authenticate( $request['code'] );

	return new WP_REST_Response( $data, $data->status );
}