WPSEO_Admin_Bar_Menu::get_term_score()
Gets the score for a given term.
Метод класса: WPSEO_Admin_Bar_Menu{}
Хуков нет.
Возвращает
Строку
. Score markup, or empty string if none available.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_term_score( $term );
- $term(WP_Term) (обязательный)
- Term object to get its score.
Код WPSEO_Admin_Bar_Menu::get_term_score() WPSEO Admin Bar Menu::get term score Yoast 22.4
protected function get_term_score( $term ) { if ( ! is_object( $term ) || ! property_exists( $term, 'term_id' ) || ! property_exists( $term, 'taxonomy' ) ) { return ''; } return $this->get_score_icon(); }