shortcode_exists( string $tag ): bool

Determines whether a registered shortcode exists named $tag.


Parameters

$tag string Required
Shortcode tag to check.

Top ↑

Return

bool Whether the given shortcode exists.


Top ↑

Source

File: wp-includes/shortcodes.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes

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