
什么是WordPress站点.htaccess文件?
apply_filters( 'rest_prepare_block_pattern', $response, $raw_pattern, $request )
rest_prepare_block_pattern是WordPress REST API的一个动作钩子,在准备作为REST API响应的一部分返回的块模式时被调用。这个钩子被调用时只有一个参数,那就是代表块模式的WP_REST_Response类的实例。开发者可以使用这个钩子在REST API响应中返回之前修改块模式的数据。
过滤REST API响应的区块样板。
return apply_filters( 'rest_prepare_block_pattern', $response, $raw_pattern, $request );