On this page
shortcode_exists( string $tag ): bool
Determines whether a registered shortcode exists named $tag.
Parameters
$tagstring Required-
Shortcode tag to check.
Return
bool Whether the given shortcode exists.
Source
File: wp-includes/shortcodes.php. View all references
function shortcode_exists( $tag ) {
global $shortcode_tags;
return array_key_exists( $tag, $shortcode_tags );
}
Related
Used By
| Used By | Description |
|---|---|
| has_shortcode() wp-includes/shortcodes.php | Determines whether the passed content contains the specified shortcode. |
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/shortcode_exists