[wp-trac] [WordPress Trac] #56417: Changes from 'render_block_data' filter not always applied to inner blocks
WordPress Trac
noreply at wordpress.org
Tue Feb 6 09:51:38 UTC 2024
#56417: Changes from 'render_block_data' filter not always applied to inner blocks
---------------------------+-----------------------------
Reporter: isabel_brison | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+-----------------------------
Comment (by wildworks):
Gutenberg now has the ability to randomize order in the Gallery block.
https://github.com/WordPress/gutenberg/pull/57477
This feature is achieved by using `render_block_data` hooks and shuffling
`$parsed_block['innerBlocks']`. However, I found that this feature does
not work when blocks are nested.
https://github.com/WordPress/gutenberg/issues/58404#issuecomment-1929138499
I'm concerned that the underlying issue is similar to what was reported in
this ticket.
Similar to this problem this hook that gives the image block the `data-id`
attribute also doesn't seem to work when the blocks are nested.
https://github.com/WordPress/gutenberg/blob/519824a7195b4a5ec20e28c8712440388c2aa024/packages
/block-library/src/gallery/index.php#L19-L33
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56417#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list