[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




/wp-includes/rest-api/endpoints/ -> class-wp-rest-blocks-controller.php (summary)

Reusable blocks REST API: WP_REST_Blocks_Controller class

File Size: 93 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_REST_Blocks_Controller:: (3 methods):

Class: WP_REST_Blocks_Controller  - X-Ref

Controller which provides a REST endpoint for the editor to read, create,
edit and delete reusable blocks. Blocks are stored as posts with the wp_block
post type.

check_read_permission( $post )   X-Ref
Checks if a block can be read.

param: WP_Post $post Post object that backs the block.
return: bool Whether the block can be read.

filter_response_by_context( $data, $context )   X-Ref
Filters a response based on the context defined in the schema.

param: array  $data    Response data to fiter.
param: string $context Context defined in the schema.
return: array Filtered response.

get_item_schema()   X-Ref
Retrieves the block's schema, conforming to JSON Schema.

return: array Item schema data.

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1