shortcode_exists
Whether a registered shortcode exists named $tag.
Description
shortcode_exists( (string) $tag );
Parameters (1)
- 0. $tag (string)
- Shortcode tag to check.
Usage
if ( !function_exists( 'shortcode_exists' ) ) { require_once ABSPATH . WPINC . '/shortcodes.php'; } // Shortcode tag to check. $tag = ''; // NOTICE! Understand what this does before running. $result = shortcode_exists($tag);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/shortcodes.php
- function shortcode_exists( $tag ) {
- global $shortcode_tags;
- return array_key_exists( $tag, $shortcode_tags );
- }