Core Class
View Source on Trac ↗
Core Class
WP_REST_Block_Directory_Controller
class WP_REST_Block_Directory_Controller
// Constructor: function Object() { [native code] } Controller which provides REST endpoint for the blocks.
Methods 9 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 install and activate plugins.
Parameters: $request: mixed |
| get_items() (WP_REST_Response | Search and retrieve blocks metadata
Parameters: $request: mixed |
| prepare_item_for_response() (WP_REST_Response | Parse block metadata for a block, and prepare it for an API response.
Parameters: $item: mixed, $request: mixed |
| prepare_links() array | Generates a list of links to include in the response for the plugin.
Parameters: $plugin: mixed |
| find_plugin_for_slug() string | Finds an installed plugin for the given slug.
Parameters: $slug: mixed |
| get_item_schema() array | Retrieves the theme's schema, conforming to JSON Schema. |
| get_collection_params() array | Retrieves the search params for the blocks collection. |
Class Information
Since Version
5.5.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php
Advertisement