WPSEO_Replace_Vars::get_term_hierarchy()
Gets a taxonomy term hierarchy including the term to get the parents for.
Метод класса: WPSEO_Replace_Vars{}
Хуков нет.
Возвращает
Строку
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_term_hierarchy();
Код WPSEO_Replace_Vars::get_term_hierarchy() WPSEO Replace Vars::get term hierarchy Yoast 24.9
private function get_term_hierarchy() { if ( ! is_taxonomy_hierarchical( $this->args->taxonomy ) ) { return ''; } $separator = ' ' . $this->retrieve_sep() . ' '; $args = [ 'format' => 'name', 'separator' => $separator, 'link' => false, 'inclusive' => true, ]; return rtrim( get_term_parents_list( $this->args->term_id, $this->args->taxonomy, $args ), $separator ); }