shortcode_exists( string $tag )

Whether a registered shortcode exists named $tag


Parameters Parameters

$tag

(string) (Required) Shortcode tag to check.


Top ↑

Return Return

(bool) Whether the given shortcode exists.



Top ↑

Source Source

File: wp-includes/shortcodes.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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