[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/ -> gallery.php (summary)

Server-side rendering of the `core/gallery` block.

File Size: 183 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  block_core_gallery_data_id_backcompatibility()
  block_core_gallery_render()
  register_block_core_gallery()

Functions
Functions that are not part of a class:

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
Renders the `core/gallery` block on the server.

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 : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref