Skip to content

Commit

Permalink
Enable extra shortcode expansion #3
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jan 7, 2024
1 parent 0715287 commit f9f1188
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**
* @copyright (C) Copyright Bobbing Wide 2023-2024
* tt4ai functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
Expand Down Expand Up @@ -116,4 +117,26 @@ function tt4ai_block_stylesheets() {

add_action( 'init', 'tt4ai_block_stylesheets' );

/**
* Expand shortcodes in the Query loop.
*/
/**
* Filters the rendered shortcode block.
*
* @param $content
* @param $parsed_block
* @param $block
* @return mixed|string
*/
function tt4ai_render_block_core_shortcode( $content, $parsed_block, $block ) {
//echo $content;
bw_trace2();
$content = do_shortcode( $content );

return $content;
}
add_filter( 'render_block_core/shortcode', 'tt4ai_render_block_core_shortcode', 10, 3, );
add_filter( 'render_block_core/paragraph', 'tt4ai_render_block_core_shortcode', 10, 3, );



0 comments on commit f9f1188

Please sign in to comment.