wp core update 6.6
This commit is contained in:
@@ -162,6 +162,12 @@ class WP_REST_Block_Patterns_Controller extends WP_REST_Controller {
|
||||
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
|
||||
*/
|
||||
public function prepare_item_for_response( $item, $request ) {
|
||||
// Resolve pattern blocks so they don't need to be resolved client-side
|
||||
// in the editor, improving performance.
|
||||
$blocks = parse_blocks( $item['content'] );
|
||||
$blocks = resolve_pattern_blocks( $blocks );
|
||||
$item['content'] = serialize_blocks( $blocks );
|
||||
|
||||
$fields = $this->get_fields_for_response( $request );
|
||||
$keys = array(
|
||||
'name' => 'name',
|
||||
|
||||
Reference in New Issue
Block a user