Skip to content

Commit

Permalink
Cover: Add 'templateLock' attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Oct 15, 2021
1 parent e8c3610 commit 2a7fe02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-library/src/cover/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
"isDark": {
"type": "boolean",
"default": true
},
"templateLock": {
"enum": [ "all", "insert", false ]
}
},
"supports": {
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ function CoverEdit( {
style: styleAttribute,
url,
alt,
templateLock,
} = attributes;
const {
gradientClass,
Expand Down Expand Up @@ -616,6 +617,7 @@ function CoverEdit( {
className: 'wp-block-cover__inner-container',
},
{
templateLock,
template: innerBlocksTemplate,
templateInsertUpdatesSelection: true,
}
Expand Down

0 comments on commit 2a7fe02

Please sign in to comment.