Yoast\WP\SEO\Helpers

Language_Helper::has_function_word_support()publicYoast 1.0

Checks whether the given language has function word support. (E.g. function words are used or filtered out for this language when doing some SEO and readability assessments).

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

Хуков нет.

Возвращает

true|false. Whether the language has function word support.

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

$Language_Helper = new Language_Helper();
$Language_Helper->has_function_word_support( $language );
$language(строка) (обязательный)
The language to check.

Код Language_Helper::has_function_word_support() Yoast 20.0

public function has_function_word_support( $language ) {
	$supported_languages = [ 'en', 'de', 'nl', 'fr', 'es', 'it', 'pt', 'ru', 'pl', 'sv', 'id', 'he', 'ar', 'hu', 'nb', 'tr', 'cs', 'sk', 'fa', 'el', 'ja' ];

	return \in_array( $language, $supported_languages, true );
}