WPSEO_MyYoast_Proxy::determine_proxy_options()protectedYoast 1.0

Determines the proxy options based on the file and plugin version arguments.

When the file is known it returns an array like this:

$array = array(
 'content_type' => 'the content type'
 'url'          => 'the url, possibly with the plugin version'
)

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

Хуков нет.

Возвращает

Массив. Empty for an unknown file. See format above for known files.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->determine_proxy_options();

Код WPSEO_MyYoast_Proxy::determine_proxy_options() Yoast 22.3

protected function determine_proxy_options() {
	if ( $this->get_proxy_file() === 'research-webworker' ) {
		return [
			'content_type' => 'text/javascript; charset=UTF-8',
			'url'          => 'https://my.yoast.com/api/downloads/file/analysis-worker?plugin_version=' . $this->get_plugin_version(),
		];
	}

	return [];
}