WPSEO_Taxonomy::determine_scope()privateYoast 1.0

Determines the scope based on the current taxonomy. This can be used by the replacevar plugin to determine if a replacement needs to be executed.

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

Хуков нет.

Возвращает

Строку. String decribing the current scope.

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

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

Код WPSEO_Taxonomy::determine_scope() Yoast 22.4

private function determine_scope() {
	$taxonomy = $this::get_taxonomy();

	if ( $taxonomy === 'category' ) {
		return 'category';
	}

	if ( $taxonomy === 'post_tag' ) {
		return 'tag';
	}

	return 'term';
}