[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/rest-api/endpoints/ -> class-wp-rest-menu-locations-controller.php (summary)

REST API: WP_REST_Menu_Locations_Controller class

File Size: 301 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_REST_Menu_Locations_Controller:: (10 methods):
  __construct()
  register_routes()
  get_items_permissions_check()
  get_items()
  get_item_permissions_check()
  get_item()
  prepare_item_for_response()
  get_item_schema()
  get_collection_params()
  prepare_links()


Class: WP_REST_Menu_Locations_Controller  - X-Ref

Core class used to access menu locations via the REST API.

__construct()   X-Ref
Menu Locations Constructor.

since: 5.9.0

register_routes()   X-Ref
Registers the routes for the objects of the controller.

since: 5.9.0

get_items_permissions_check( $request )   X-Ref
Checks whether a given request has permission to read menu locations.

param: WP_REST_Request $request Full details about the request.
since: 5.9.0
return: WP_Error|bool True if the request has read access, WP_Error object otherwise.

get_items( $request )   X-Ref
Retrieves all menu locations, depending on user context.

param: WP_REST_Request $request Full details about the request.
since: 5.9.0
return: WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.

get_item_permissions_check( $request )   X-Ref
Checks if a given request has access to read a menu location.

param: WP_REST_Request $request Full details about the request.
since: 5.9.0
return: WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.

get_item( $request )   X-Ref
Retrieves a specific menu location.

param: WP_REST_Request $request Full details about the request.
since: 5.9.0
return: WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.

prepare_item_for_response( $item, $request )   X-Ref
Prepares a menu location object for serialization.

param: stdClass        $item    Post status data.
param: WP_REST_Request $request Full details about the request.
since: 5.9.0
return: WP_REST_Response Menu location data.

get_item_schema()   X-Ref
Retrieves the menu location's schema, conforming to JSON Schema.

since: 5.9.0
return: array Item schema data.

get_collection_params()   X-Ref
Retrieves the query params for collections.

since: 5.9.0
return: array Collection parameters.

prepare_links( $location )   X-Ref
Prepares links for the request.

param: stdClass $location Menu location.
since: 5.9.0
return: array Links for the given menu location.



Generated: Fri Jul 1 01:00:02 2022 Cross-referenced by PHPXref 0.7.1