rest_prepare_block_type

过滤钩子


apply_filters( 'rest_prepare_block_type', $response, $block_type, $request )
参数
  • (WP_REST_Response)
    $response
    The response object.
    Required:
  • (WP_Block_Type)
    $block_type
    The original block type object.
    Required:
  • (WP_REST_Request)
    $request
    Request used to generate the response.
    Required:
定义位置
  • wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
    , line 339
引入
5.5.0
弃用

Filters a block type returned from the REST API.

Allows modification of the block type data right before it is returned.

return apply_filters( 'rest_prepare_block_type', $response, $block_type, $request );