Gets the nav menu item, if the ID is valid.
Parameters
$id
intrequired- Supplied ID.
Source
protected function get_nav_menu_item( $id ) {
$post = $this->get_post( $id );
if ( is_wp_error( $post ) ) {
return $post;
}
return wp_setup_nav_menu_item( $post );
}
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.