Languages: English • Italiano • Reference/shortcode exists 日本語 (Add your language)
Checks whether a specific shortcode has been registered or not.
<?php if ( shortcode_exists( 'gallery' ) ) { } ?>
<?php
if ( shortcode_exists( 'gallery' ) ) {
// The [gallery] short code exists.
}
?>
shortcode_exists() is located in wp-includes/shortcodes.php.