rest_prepare_menu_location WordPress Filter Hook
The rest_prepare_menu_location hook is used to modify the response object before it is returned for a request. This hook allows you to add or remove data from the response object, or even change the response code.
apply_filters( 'rest_prepare_menu_location',  WP_REST_Response $response ,  object $location ,  WP_REST_Request $request  ) #
Filters menu location data returned from the REST API.
Parameters
- $response
- (WP_REST_Response)The response object. 
- $location
- (object)The original location object. 
- $request
- (WP_REST_Request)Request used to generate the response. 
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-menu-locations-controller.php
Changelog
| Version | Description | 
|---|---|
| 5.9.0 | Introduced. |