Yoast\WP\SEO\AI\HTTP_Request\Infrastructure
API_Client::get_base_url
Resolves the base URL for the AI API, applying the configurable override filter.
Метод класса: API_Client{}
Хуки из метода
Возвращает
string. The (possibly filtered) base URL, including its path (e.g. https://ai.yoa.st/api/v1).
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_base_url(): string;
Код API_Client::get_base_url() API Client::get base url Yoast 28.9
private function get_base_url(): string {
/**
* Filter: 'Yoast\WP\SEO\ai_api_url' - Replaces the default URL for the AI API with a custom one.
*
* @internal
*
* @param string $url The default URL for the AI API.
*/
return (string) \apply_filters( 'Yoast\WP\SEO\ai_api_url', $this->base_url );
}