Skip to content

Commit 0b7728b

Browse files
committed
docs(README): document the modal inner allowed blocks filter
Adds a new section to the README explaining how to use the `blockparty_modal_inner_allowed_blocks` filter, including usage examples and parameter details.
1 parent 7669f74 commit 0b7728b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,27 @@ add_filter( 'blockparty_modal_trigger_allowed_blocks', function ( $blocks ) {
9191
- **Parameters:** `array` — List of block names (e.g. `'core/button'`).
9292
- **Default:** `array( 'core/button' )`
9393

94+
### Blocks allowed inside the modal
95+
96+
The modal block uses InnerBlocks for its content. By default, a fixed set of blocks is allowed (paragraph, heading, list, image, button, etc.). To change which blocks can be inserted inside the modal, use the filter `blockparty_modal_inner_allowed_blocks` in your theme or plugin:
97+
98+
```php
99+
add_filter( 'blockparty_modal_inner_allowed_blocks', function ( array $blocks ) {
100+
// Add more blocks
101+
$blocks[] = 'core/cover';
102+
$blocks[] = 'core/group';
103+
return $blocks;
104+
} );
105+
106+
// Or restrict to a subset
107+
add_filter( 'blockparty_modal_inner_allowed_blocks', function () {
108+
return [ 'core/paragraph', 'core/image', 'core/button' ];
109+
} );
110+
```
111+
112+
- **Filter name:** `blockparty_modal_inner_allowed_blocks`
113+
- **Parameters:** `array` — List of block names (e.g. `'core/paragraph'`, `'core/button'`). Default list includes paragraph, heading, list, image, gallery, video, buttons, embed, shortcode, etc.
114+
94115
## 🛠️ Development
95116

96117
### Project Structure

0 commit comments

Comments
 (0)