I would like to add shortcodes whose content gets processed by plugins before it gets displayed in the page.
In particular, I have a plugin which processes content between two $ signs to produce math formulas and graphs. A simple shortcode is
add_shortcode( 'test', 'test_sc' );
function test_sc( $atts ){ return "$\frac{15}{5} = 3$"; }
By writing $\frac{15}{5} = 3$
in a page this gets displayed
By writing [test]
in a page this gets displayed $\frac{15}{5} = 3$
WordPress does a few things before the content from a page or post gets displayed on the site. For instance, it processes HTML paragraph (p) tags, it runs shortcodes and even sends the content to the theme and any plugins so they can do their thing to the content and include their bits.
I heard that using do_shortcode_tag
(reference) it is possibile to do full content processing, but how to do that?