WPSEO_Slug_Change_Watcher::get_taxonomy_label_for_term
Gets the taxonomy label to use for a term.
Метод класса: WPSEO_Slug_Change_Watcher{}
Хуков нет.
Возвращает
Строку. The taxonomy's singular label.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_taxonomy_label_for_term( $term_id );
- $term_id(int) (обязательный)
- The term ID.
Код WPSEO_Slug_Change_Watcher::get_taxonomy_label_for_term() WPSEO Slug Change Watcher::get taxonomy label for term Yoast 26.9
protected function get_taxonomy_label_for_term( $term_id ) {
$term = get_term( $term_id );
$taxonomy = get_taxonomy( $term->taxonomy );
return $taxonomy->labels->singular_name;
}