Upon my research the latest question I was able to reference referred to the WP REST API plugin before it was built into core. The best answer on the question referred to building a custom endpoint
(I’m not a fan of using the plugin):
function get_menu() {
# Change 'menu' to your own navigation slug.
return wp_get_nav_menu_items('menu');
}
add_action( 'rest_api_init', function () {
register_rest_route( 'myroutes', '/menu', array(
'methods' => 'GET',
'callback' => 'get_menu',
) );
} );
I was unable to see anything mentioned in the handbook. When reviewing all the routes
in Postman I see everything but menus
:
Is there a way in WP REST API that is built into core to get the menu
without building a custom endpoint? Am I missing it somewhere?