shortcode_exists

Advertisement

Summery Summery

Whether a registered shortcode exists named $tag

Syntax Syntax

shortcode_exists( string $tag )

Parameters Parameters

$tag

(string) (Required) Shortcode tag to check.

Return Return

(bool) Whether the given shortcode exists.

Source Source

File: wp-includes/shortcodes.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.6.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.