shortcode_exists( string $tag ): bool
Determines whether a registered shortcode exists named $tag.
Parameters
-
$tag
string 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 );
}
Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Basic Example