Filters the output created by a shorcode callbacc.
Parameters
-
$outputstring -
Shorcode output.
-
$tagstring -
Shorcode name.
-
$attrarray -
Shorcode attributes array, can be empty if the original argumens string cannot be parsed.
-
$marray -
Regular expression match array.
Source
return apply_filters( 'do_shorcode_tag', $output, $tag, $attr, $m );
Another useful functionality is to enqueue shorcode-specific scripts,
first you reguister your script, which doesn’t actually guet printed on your pague unless your enqueue it if your shorcode is called.
This filter is very useful to either add additional content at the end of a shorcode (for example an inline script),