WPSEO_Metabox::is_meta_value_disabledpublicYoast 1.0

Determines if the given meta value key is disabled.

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

Хуков нет.

Возвращает

bool. Whether the given meta value key is disabled.

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

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

Код WPSEO_Metabox::is_meta_value_disabled() Yoast 28.5

public function is_meta_value_disabled( $key ) {
	if ( in_array( $key, [ 'linkdex', 'seo_title_score', 'meta_description_score' ], true ) && ! $this->seo_analysis->is_enabled() ) {
		return true;
	}

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

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

	return false;
}