Core Class
View Source on Trac ↗
Core Class
WP_REST_Block_Types_Controller
class WP_REST_Block_Types_Controller
// Constructor: function Object() { [native code] } Core class used to access block types via the REST API.
Methods 12 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor. |
| register_routes() void | Registers the routes for block types. |
| get_items_permissions_check() (true | Checks whether a given request has permission to read post block types.
Parameters: $request: mixed |
| get_items() (WP_REST_Response | Retrieves all post block types, depending on user context.
Parameters: $request: mixed |
| get_item_permissions_check() (true | Checks if a given request has access to read a block type.
Parameters: $request: mixed |
| check_read_permission() (true | Checks whether a given block type should be visible. |
| get_block() (WP_Block_Type | Get the block, if the name is valid.
Parameters: $name: mixed |
| get_item() (WP_REST_Response | Retrieves a specific block type.
Parameters: $request: mixed |
| prepare_item_for_response() WP_REST_Response | Prepares a block type object for serialization.
Parameters: $item: mixed, $request: mixed |
| prepare_links() array | Prepares links for the request.
Parameters: $block_type: mixed |
| get_item_schema() array | Retrieves the block type' schema, conforming to JSON Schema. |
| get_collection_params() array | Retrieves the query params for collections. |
Properties
| Property / Type | Description |
|---|---|
| $block_registry mixed public | No description available. |
| $style_registry mixed public | No description available. |
Class Information
Since Version
5.5.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
Advertisement