Yoast\WP\SEO\Helpers

Language_Helper::is_word_form_recognition_active()publicYoast 1.0

Checks whether word form recognition is active for the used language.

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

Хуков нет.

Возвращает

true|false. Whether word form recognition is active for the used language.

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

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

Код Language_Helper::is_word_form_recognition_active() Yoast 19.11

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

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