[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
WP_REST_Navigation_Fallback_Controller class REST Controller to create/fetch a fallback Navigation Menu.
File Size: | 191 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_REST_Navigation_Fallback_Controller:: (7 methods):
__construct()
register_routes()
get_item_permissions_check()
get_item()
get_item_schema()
prepare_item_for_response()
prepare_links()
Class: WP_REST_Navigation_Fallback_Controller - X-Ref
REST Controller to fetch a fallback Navigation Block Menu. If needed it creates one.__construct() X-Ref |
Constructs the controller. |
register_routes() X-Ref |
Registers the controllers routes. |
get_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to read fallbacks. return: true|WP_Error True if the request has read access, WP_Error object otherwise. param: WP_REST_Request $request Full details about the request. |
get_item( $request ) X-Ref |
Gets the most appropriate fallback Navigation Menu. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. param: WP_REST_Request $request Full details about the request. |
get_item_schema() X-Ref |
Retrieves the fallbacks' schema, conforming to JSON Schema. return: array Item schema data. |
prepare_item_for_response( $item, $request ) X-Ref |
Matches the post data to the schema we want. return: WP_REST_Response $response The response data. param: WP_Post $item The wp_navigation Post object whose response is being prepared. param: WP_REST_Request $request Request object. |
prepare_links( $post ) X-Ref |
Prepares the links for the request. return: array Links for the given request. param: WP_Post $post the Navigation Menu post object. |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |