Skip to content

Commit

Permalink
Change syntax again
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jun 6, 2023
1 parent 236dc32 commit 2ae6616
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/experimental/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function gutenberg_register_auto_inserted_blocks( $settings, $metadata ) {
);

$auto_insert = $metadata['autoInsert'];
foreach ( $auto_insert as $block => $position ) {
foreach ( $auto_insert as $position => $block ) {
if ( ! isset( $property_mappings[ $position ] ) ) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/avatar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"editorStyle": "wp-block-avatar",
"style": "wp-block-avatar",
"autoInsert": {
"core/post-content": "after"
"after": "core/post-content"
}
}
8 changes: 4 additions & 4 deletions schemas/json/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -740,12 +740,12 @@
},
"autoInsert": {
"type": "object",
"description": "Blocks to auto-insert this block next to.",
"description": "Position and block that specify where to auto-insert this block.",
"patternProperties": {
"[a-zA-Z]": {
"^(nextSibling|previousSibling|firstChild|lastChild)$": {
"type": "string",
"description": "Position relative to the block to auto-insert this block next to.",
"pattern": "^(nextSibling|previousSibling|firstChild|lastChild)$"
"description": "Block to insert this block next to.",
"pattern": "[a-zA-Z]"
}
}
}
Expand Down

0 comments on commit 2ae6616

Please sign in to comment.