Determines whether a registered shortcode exists named $tag.
Parameters
$tagstringrequired- Shortcode tag to check.
Source
function shortcode_exists( $tag ) {
global $shortcode_tags;
return array_key_exists( $tag, $shortcode_tags );
}
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
Basic Example