I’m using do_shortcode
function to add shortcode in my template. But i would like to check if that shortcode exists before display them.
I mean like this
If (shortcode_gallery_exists) {
echo do_shortcode('');
}
Can anyone help me? Thanks
I’m using do_shortcode
function to add shortcode in my template. But i would like to check if that shortcode exists before display them.
I mean like this
If (shortcode_gallery_exists) {
echo do_shortcode('');
}
Can anyone help me? Thanks
#23572 introduced shortcode_exists() into 3.6.