PluginProbe
Content Blocks Builder – Create blocks, repeater blocks with carousel, grid, popup layouts / 2.8.15
Content Blocks Builder – Create blocks, repeater blocks with carousel, grid, popup layouts v2.8.15
2.8.15 2.8.14 2.8.13 2.8.12 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.10 2.8.11 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 trunk 1.0.1 1.0.2 1.1.0 All 148 releases
← All changes | includes/block-overrides.php +12 -1 2.8.6 → 2.8.15 View file →
@@ -25,9 +25,9 @@
25 25 protected $supported_core_blocks = [
26 26 'core/paragraph' => [ 'content' ],
27 27 'core/heading' => [ 'content' ],
28 28 'core/button' => [ 'text', 'url', 'linkTarget', 'rel' ],
29 - 'core/image' => [ 'id', 'url', 'title', 'alt' ],
29 + 'core/image' => [ 'id', 'url', 'title', 'alt', 'caption' ],
30 30 ];
31 31
32 32 /**
33 33 * Define a list of supported block binding
@@ -355,8 +355,19 @@
355 355 } elseif ( 'boldblocks/youtube-block' === $block_instance->name ) {
356 356 if ( function_exists( 'better_youtube_embed_block_render_block' ) ) {
357 357 // Merge with dynamic content.
358 358 $attributes = array_merge( $block_instance->attributes, $computed_attributes );
359 +
360 + // Get caption from the markup if there is no binding value.
361 + if ( ! isset( $computed_attributes['caption'] ) ) {
362 + $caption = $this->the_plugin_instance->get_component( CustomStyle::class )->get_element_inner_html( $block_content, 'FIGCAPTION' );
363 + if ( $caption ) {
364 + $attributes['caption'] = $caption;
365 + }
366 + }
367 +
368 + // Allow inline tags.
369 + $attributes['caption_kses'] = true;
359 370
360 371 return better_youtube_embed_block_render_block( $attributes );
361 372 }
362 373 } elseif ( 'boldblocks/counting-number' === $block_instance->name ) {