Skip to content

Commit

Permalink
feat: Add support for object properties inside block attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclay committed Mar 29, 2024
1 parent ad03a21 commit 754cc0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/Blocks/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ private function get_attribute_type( $name, $attribute, $prefix ) {
}
break;
case 'object':
$type = Scalar::get_block_attributes_object_type_name();
if ( isset( $attribute['properties'] ) ) {
$type = $this->get_query_type( $name, $attribute['properties'], $prefix );
} else {
$type = Scalar::get_block_attributes_object_type_name();
}
break;
}
} elseif ( isset( $attribute['source'] ) ) {
Expand Down

0 comments on commit 754cc0a

Please sign in to comment.