WPSEO_Primary_Term::get_terms()
Get the terms for the current post ID. When $terms is not an array, set $terms to an array.
Метод класса: WPSEO_Primary_Term{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_terms();
Код WPSEO_Primary_Term::get_terms() WPSEO Primary Term::get terms Yoast 24.9
protected function get_terms() { $terms = get_the_terms( $this->post_ID, $this->taxonomy_name ); if ( ! is_array( $terms ) ) { $terms = []; } return $terms; }