WPDev.one
Core Class

WP_REST_Block_Patterns_Controller

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

Core class used to access block patterns via the REST API.

Methods 7 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 patterns.

Parameters: $request: mixed
migrate_pattern_categories()
array

Migrates old core pattern categories to the new categories.

Parameters: $pattern: 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 schema, conforming to JSON Schema.

Properties

Property / Type Description
$remote_patterns_loaded
mixed
public
No description available.
$categories_migration
mixed
public
No description available.

Class Information

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