Core Class
View Source on Trac ↗
Core Class
WP_REST_Pattern_Directory_Controller
class WP_REST_Pattern_Directory_Controller
// Constructor: function Object() { [native code] } Controller which provides REST endpoint for block patterns.
Methods 8 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructs the controller. |
| register_routes() void | Registers the necessary REST API routes. |
| get_items_permissions_check() (true | Checks whether a given request has permission to view the local block pattern directory.
Parameters: $request: mixed |
| get_items() (WP_REST_Response | Search and retrieve block patterns metadata
Parameters: $request: mixed |
| prepare_item_for_response() WP_REST_Response | Prepare a raw block pattern before it gets output in a REST API response.
Parameters: $item: mixed, $request: mixed |
| get_item_schema() array | Retrieves the block pattern's schema, conforming to JSON Schema. |
| get_collection_params() array | Retrieves the search parameters for the block pattern's collection. |
| get_transient_key() string | Include a hash of the query args, so that different requests are stored in
Parameters: $query_args: mixed |
Class Information
Since Version
5.8.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
Advertisement