You are here

function gutenberg_render_block_core_cover in Gutenberg 8.2

Supports `playsinline` attribute server side for `core/cover`.

Parameters

array $attributes The block attributes.:

string $content HTML content of the block.:

Return value

string Rendered HTML of the referenced block.

1 string reference to 'gutenberg_render_block_core_cover'
gutenberg_register_block_core_cover in vendor/gutenberg/block-library/blocks/cover.php
Registers the `core/cover` block.

File

vendor/gutenberg/block-library/blocks/cover.php, line 16

Code

function gutenberg_render_block_core_cover($attributes, $content) {
  if (isset($attributes['backgroundType']) && 'video' === $attributes['backgroundType']) {
    return str_replace('autoplay muted', 'autoplay muted playsinline', $content);
  }
  return $content;
}