WP_REST_Block_Patterns_Controller
- Since
- 6.0.0
- Source
wp-includes/rest-api/endpoints/class-wp-rest-block-patterns-controller.php:17
Core class used to access block patterns via the REST API.
Compatibility
- WordPress
- since 6.0.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Properties · 2
$remote_patterns_loadedboolprivate- Defines whether remote patterns should be loaded.
$categories_migrationarrayprotected static- An array that maps old categories names to new ones.
Methods · 7
- __construct()Constructs the controller.
- register_routes()Registers the routes for the objects of the controller.
- get_items_permissions_check()Checks whether a given request has permission to read block patterns.
- get_items()Retrieves all block patterns.
- migrate_pattern_categories()Migrates old core pattern categories to the new categories.
- prepare_item_for_response()Prepare a raw block pattern before it gets output in a REST API response.
- get_item_schema()Retrieves the block pattern schema, conforming to JSON Schema.
Changelog
Introduced in 6.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/rest-api/endpoints/class-wp-rest-block-patterns-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.