[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/rest-api/endpoints/ -> class-wp-rest-block-pattern-categories-controller.php (summary)

REST API: WP_REST_Block_Pattern_Categories_Controller class

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

Defines 1 class

WP_REST_Block_Pattern_Categories_Controller:: (6 methods):
  __construct()
  register_routes()
  get_items_permissions_check()
  get_items()
  prepare_item_for_response()
  get_item_schema()


Class: WP_REST_Block_Pattern_Categories_Controller  - X-Ref

Core class used to access block pattern categories via the REST API.

__construct()   X-Ref
Constructs the controller.


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


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

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_items( $request )   X-Ref
Retrieves all block pattern categories.

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.

prepare_item_for_response( $item, $request )   X-Ref
Prepare a raw block pattern category before it gets output in a REST API response.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
param: array           $item    Raw category as registered, before any changes.
param: WP_REST_Request $request Request object.

get_item_schema()   X-Ref
Retrieves the block pattern category schema, conforming to JSON Schema.

return: array Item schema data.



Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref