| [ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Server-side rendering of the `core/gallery` block.
| File Size: | 86 lines (3 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| block_core_gallery_data_id_backcompatibility( $parsed_block ) X-Ref |
| 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. return: array The migrated block object. param: array $parsed_block The block being rendered. |
| block_core_gallery_render( $attributes, $content ) X-Ref |
| Adds a style tag for the --wp--style--unstable-gallery-gap var. The Gallery block needs to recalculate Image block width based on the current gap setting in order to maintain the number of flex columns so a css var is added to allow this. return: string The content of the block being rendered. param: array $attributes Attributes of the block being rendered. param: string $content Content of the block being rendered. |
| register_block_core_gallery() X-Ref |
| No description |
| Generated: Tue Oct 28 01:00:02 2025 | Cross-referenced by PHPXref 0.7.1 |