apply_filters( 'do_shortcode_tag', string $output , string $tag , array|string $attr , array $m )
Filters the output created by a shortcode callback.
Parameters
-
$output
string -
Shortcode output.
-
$tag
string -
Shortcode name.
-
$attr
array|string -
Shortcode attributes array or the original arguments string if it cannot be parsed.
-
$m
array -
Regular expression match array.
Source
File: wp-includes/shortcodes.php
.
View all references
return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Another useful functionality is to enqueue shortcode-specific scripts,
first you register your script, which doesn’t actually get printed on your page unless your enqueue it if your shortcode is called.
This filter is very useful to either add additional content at the end of a shortcode (for example an inline script),