Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc8ea11

Browse files
committed
Rearrange example code
1 parent 541fc6c commit bc8ea11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,11 +1321,11 @@ This is useful if you want to add or remove inner blocks from the tree based on
13211321
add_filter( 'vip_block_data_api__sourced_block_inner_blocks', 'remove_gallery_inner_blocks', 10, 4 );
13221322
13231323
function remove_gallery_inner_blocks( $inner_blocks, $block_name, $post_id, $block ) {
1324-
if ( 'core/gallery' !== $block_name ) {
1325-
return $inner_blocks;
1324+
if ( 'core/gallery' === $block_name ) {
1325+
return [];
13261326
}
13271327
1328-
return [];
1328+
return $inner_blocks;
13291329
}
13301330
```
13311331

0 commit comments

Comments
 (0)