Last active
July 18, 2023 15:22
-
-
Save someguy9/aae2c710d83e241001b86139d5663135 to your computer and use it in GitHub Desktop.
Check if a shortcode already exists in WordPress https://smartwp.com/check-if-shortcode-exists/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( shortcode_exists( 'image_gallery' ) ) { | |
echo 'The [image_gallery] shortcode already exists'; | |
} | |
if ( !shortcode_exists( 'image_gallery' ) ) { | |
echo 'The [image_gallery] shortcode does not exist'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment