• Resolved Ericmuc

    (@ericmuc)


    Hi there,
    thanks for the recent update – it looks great!
    However, I noticed that shortcodes are currently not working properly in the new version.

    At the moment, only core/shortcode blocks are passed through do_shortcode(), but shortcodes inside other blocks (like paragraphs or columns) are no longer executed.

    Also, the final $content doesn’t seem to be passed through apply_filters( 'the_content', $content ), which is normally essential for processing shortcodes, oEmbeds, and other content filters.

    Would it be possible to adjust this in a future update?

    Here’s a version that works well on our end:

    $content = '';
    foreach ( $blocks as $block ) {
    if( 'core/embed' === $block['blockName'] ){
    $content .= apply_filters( 'the_content', render_block( $block ) );
    }else{

    // $content .= render_block( $block );
    $content .= do_shortcode(render_block( $block ));
    }
    }
    $content = apply_filters('the_content', $content);
    return wp_kses( $content, $allowedHTML );
    }

    Thanks a lot for looking into it – and for your great work on this plugin!

    • This topic was modified 1 year ago by Ericmuc.
Viewing 1 replies (of 1 total)
  • Plugin Support Plugin Envision Support

    (@pluginenvisionsupport)

    Hi @ericmuc,

    We have updated the code without a version update. You can try it now.

    If everything goes right, the updated code will persist. If other users have issues, we will return to the previous code.

    Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Shortcode in current version not working’ is closed to new replies.