Closed cfaria closed 4 years ago
The other way to solve this is to create functionality to have the has_inner_blocks var in the Sage block view file headers. But as this is not a default functionality I think it's better to add it with that new hook.
Hi Michael ;D. Would you mind check this out? Won't bother you again... Thank you!!
In order to create ACF blocks with innerBlocks Gutenberg functionality I need to filter the $data array to add an entry named has_inner_blocks. I'm following this gist https://gist.github.com/gaambo/633bcd83a9596762218ffa65d0cfe22a and it works like a charm, but I need to show inner blocks in the editor inside ACF HTML output.
With this change I can call the hook to add $data['has_inner_blocks'] = true; for that container block. I'm doing sth like @terence1990 comment here: https://gist.github.com/gaambo/633bcd83a9596762218ffa65d0cfe22a#gistcomment-3182473
Code tested and works but change the hook name as you want ;D