'default' => array
(),
'validate_callback' =>
static function D
$value,
$request ) { $block = WP_Block_Type_Registry::
get_instance()->
get_registered( $request['name'
] );
if ( !
$block ) { // This will get rejected in ::get_item().
return true;
} $schema = array
( 'type' => 'object',
'properties' =>
$block->
get_attributes(),
'additionalProperties' => false,
);
return rest_validate_value_from_schema( $value,
$schema );
},
'sanitize_callback' =>
static function D
$value,
$request ) { $block = WP_Block_Type_Registry::
get_instance()->
get_registered( $request['name'
] );
if ( !
$block ) { // This will get rejected in ::get_item().
return true;
}