Gets the term, if the ID is valid.
Parameters
$id
intrequired- Supplied ID.
Source
protected function get_term( $id ) {
$term = parent::get_term( $id );
if ( is_wp_error( $term ) ) {
return $term;
}
$nav_term = wp_get_nav_menu_object( $term );
$nav_term->auto_add = $this->get_menu_auto_add( $nav_term->term_id );
return $nav_term;
}
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.