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 +6 -12 2.8.8 → 2.8.15 View file →
@@ -358,22 +358,16 @@
358 358 $attributes = array_merge( $block_instance->attributes, $computed_attributes );
359 359
360 360 // Get caption from the markup if there is no binding value.
361 361 if ( ! isset( $computed_attributes['caption'] ) ) {
362 - $block_reader = new \WP_HTML_Tag_Processor( $block_content );
363 - if ( $block_reader->next_tag( 'figcaption' ) ) {
364 - $caption = '';
365 - while ( $block_reader->next_token() ) {
366 - if ( '#text' === $block_reader->get_token_name() ) {
367 - $caption .= $block_reader->get_modifiable_text();
368 - }
369 - }
370 -
371 - if ( $caption ) {
372 - $attributes['caption'] = $caption;
373 - }
362 + $caption = $this->the_plugin_instance->get_component( CustomStyle::class )->get_element_inner_html( $block_content, 'FIGCAPTION' );
363 + if ( $caption ) {
364 + $attributes['caption'] = $caption;
374 365 }
375 366 }
367 +
368 + // Allow inline tags.
369 + $attributes['caption_kses'] = true;
376 370
377 371 return better_youtube_embed_block_render_block( $attributes );
378 372 }
379 373 } elseif ( 'boldblocks/counting-number' === $block_instance->name ) {