You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference-guides/block-api/block-supports.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,6 +174,34 @@ attributes: {
174
174
}
175
175
```
176
176
177
+
## blockVisibility
178
+
179
+
_**Note:** Since WordPress 6.9._
180
+
181
+
- Type: `boolean`
182
+
- Default value: `true`
183
+
184
+
By default, a block can be hidden within the editor from the block "Options" dropdown or the block toolbar. To disable this behavior for a block, set `blockVisibility` to `false`.
185
+
186
+
```js
187
+
supports: {
188
+
// Don't allow the block to be hidden via the editor UI.
189
+
blockVisibility:false
190
+
}
191
+
```
192
+
193
+
When a block is hidden, the state is stored in the block's `metadata` attribute:
0 commit comments