[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

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

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

Defines 5 functions

  render_block_core_image()
  block_core_image_get_lightbox_settings()
  block_core_image_render_lightbox()
  block_core_image_print_lightbox_overlay()
  register_block_core_image()

Functions
Functions that are not part of a class:

render_block_core_image( $attributes, $content, $block )   X-Ref
Renders the `core/image` block on the server,
adding a data-id attribute to the element if core/gallery has added on pre-render.

return: string The block content with the data-id attribute added.
param: array    $attributes The block attributes.
param: string   $content    The block content.
param: WP_Block $block      The block object.

block_core_image_get_lightbox_settings( $block )   X-Ref
Adds the lightboxEnabled flag to the block data.

This is used to determine whether the lightbox should be rendered or not.

return: array Filtered block data.
param: array $block Block data.

block_core_image_render_lightbox( $block_content, $block )   X-Ref
Adds the directives and layout needed for the lightbox behavior.

return: string Filtered block content.
param: string $block_content Rendered block content.
param: array  $block         Block object.

block_core_image_print_lightbox_overlay()   X-Ref
No description

register_block_core_image()   X-Ref
Registers the `core/image` block on server.




Generated : Wed Apr 24 08:20:01 2024 Cross-referenced by PHPXref