WordPress Version: 6.1
/**
* Determines whether a registered shortcode exists named $tag.
*
* @since 3.6.0
*
* @global array $shortcode_tags List of shortcode tags and their callback hooks.
*
* @param string $tag Shortcode tag to check.
* @return bool Whether the given shortcode exists.
*/
function shortcode_exists($tag)
{
global $shortcode_tags;
return array_key_exists($tag, $shortcode_tags);
}