block_core_gallery_data_id_backcompatibility
block_core_gallery_data_id_backcompatibility ( $parsed_block )
Parameters:- (array) parsed_block The block being rendered.
Returns:- (array) The migrated block object.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Handles backwards compatibility for Gallery Blocks,
whose images feature a `data-id` attribute.Now that the Gallery Block contains inner Image Blocks,
we add a custom `data-id` attribute before rendering the gallery
so that the Image Block can pick it up in its render_callback.