shortcode_exists

The timeline below displays how wordpress function shortcode_exists has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

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);
}

WordPress Version: 4.2

/**
 * 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);
}

WordPress Version: 3.7

/**
 * Whether a registered shortcode exists named $tag
 *
 * @since 3.6.0
 *
 * @global array $shortcode_tags
 * @param string $tag
 * @return boolean
 */
function shortcode_exists($tag)
{
    global $shortcode_tags;
    return array_key_exists($tag, $shortcode_tags);
}