WPSEO_Taxonomy::is_meta_value_disabled()publicYoast 1.0

Determines if the given meta value key is disabled.

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

Хуков нет.

Возвращает

true|false. Whether the given meta value key is disabled.

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

$WPSEO_Taxonomy = new WPSEO_Taxonomy();
$WPSEO_Taxonomy->is_meta_value_disabled( $key );
$key(строка) (обязательный)
The key of the meta value.

Код WPSEO_Taxonomy::is_meta_value_disabled() Yoast 22.4

public function is_meta_value_disabled( $key ) {
	if ( $key === 'wpseo_linkdex' && ! $this->analysis_seo->is_enabled() ) {
		return true;
	}

	if ( $key === 'wpseo_content_score' && ! $this->analysis_readability->is_enabled() ) {
		return true;
	}

	if ( $key === 'wpseo_inclusive_language_score' && ! $this->analysis_inclusive_language->is_enabled() ) {
		return true;
	}

	return false;
}