shortcode_exists( string $tag ): bool

Determines whether a registered shortcode exists named $tag.

Parameters

$tagstringrequired
Shortcode tag to check.

Return

bool Whether the given shortcode exists.

Source

function shortcode_exists( $tag ) {
	global $shortcode_tags;
	return array_key_exists( $tag, $shortcode_tags );
}

Changelog

VersionDescription
3.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.