WPSEO_Taxonomy::determine_scope
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() WPSEO Taxonomy::determine scope Yoast 27.7
private function determine_scope() {
$taxonomy = $this::get_taxonomy();
if ( $taxonomy === 'category' ) {
return 'category';
}
if ( $taxonomy === 'post_tag' ) {
return 'tag';
}
return 'term';
}