WPDev.one
Core Class

WP_REST_Block_Pattern_Categories_Controller

class WP_REST_Block_Pattern_Categories_Controller // Constructor: function Object() { [native code] }

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

Methods 6 methods

Method / Return Description
__construct()
void

Constructs the controller.

register_routes()
void

Registers the routes for the objects of the controller.

get_items_permissions_check()
(true

Checks whether a given request has permission to read block patterns.

Parameters: $request: mixed
get_items()
(WP_REST_Response

Retrieves all block pattern categories.

Parameters: $request: mixed
prepare_item_for_response()
(WP_REST_Response

Prepare a raw block pattern category before it gets output in a REST API response.

Parameters: $item: mixed, $request: mixed
get_item_schema()
array

Retrieves the block pattern category schema, conforming to JSON Schema.

Class Information

Since Version
6.0.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-block-pattern-categories-controller.php
Advertisement