Skip to content

Commit

Permalink
Execute the_content filters after executing shortcode.
Browse files Browse the repository at this point in the history
Allows execution of oembed and of block structures.
  • Loading branch information
joedolson committed Sep 10, 2024
1 parent 88e01bd commit 8d78f5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/my-calendar-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,10 @@ function mc_show_event_template( $content ) {
$content = do_shortcode( apply_filters( 'mc_event_post_content', $new_content, $content, $post ) );
}
}
// Execute content filters so that OEmbeds are processed, after removing this filter.
remove_filter( 'the_content', 'mc_show_event_template', 100, 1 );
$content = apply_filters( 'the_content', $content );
add_filter( 'the_content', 'mc_show_event_template', 100, 1 );

return $content;
}
Expand Down

0 comments on commit 8d78f5e

Please sign in to comment.