shortcode_exists

函数


shortcode_exists ( $tag )
参数
  • (string)
    $tag
    Shortcode tag to check.
    Required:
返回值
  • (bool) Whether the given shortcode exists.
定义位置
  • wp-includes/shortcodes.php
    , line 133
引入
3.6.0
弃用

Determines whether a registered shortcode exists named $tag.

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