add_shortcode ( $tag, $callback )
- (string) $tag Shortcode tag to be searched in post content.
- (callable) $callback The callback function to run when the shortcode is found. Every shortcode callback is passed three parameters by default, including an array of attributes (`$atts`), the shortcode content or null if not set (`$content`), and finally the shortcode tag itself (`$shortcode_tag`), in that order.
- Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Adds a new shortcode.
Care should be taken through prefixing or other means to ensure that the
shortcode tag being added is unique and will not conflict with other,
already-added shortcode tags. In the event of a duplicated tag, the tag
loaded last will take precedence.