[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Block Renderer REST API: WP_REST_Block_Renderer_Controller class

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

Defines 1 class

WP_REST_Block_Renderer_Controller:: (5 methods):
  __construct()
  register_routes()
  get_item_permissions_check()
  get_item()
  get_item_schema()


Class: WP_REST_Block_Renderer_Controller  - X-Ref

Controller which provides REST endpoint for rendering a block.

__construct()   X-Ref
Constructs the controller.

since: 5.0.0

register_routes()   X-Ref
Registers the necessary REST API routes, one for each dynamic block.

since: 5.0.0

get_item_permissions_check( $request )   X-Ref
Checks if a given request has access to read blocks.

param: WP_REST_Request $request Request.
since: 5.0.0
return: true|WP_Error True if the request has read access, WP_Error object otherwise.

get_item( $request )   X-Ref
Returns block output from block's registered render_callback.

param: WP_REST_Request $request Full details about the request.
since: 5.0.0
return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.

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

since: 5.0.0
return: array Item schema data.



Generated: Mon Sep 23 01:00:03 2019 Cross-referenced by PHPXref 0.7.1