I need a list of every shortcode inside the content. Is there any way to list them?
This is what I need:
$str = '[term value="Value" id="600"][term value="Term" id="609"]';
So every shortcode should be inside the $str
.
I found a code snippet to check if there is a shortcode. But how can I display them all?
$content = 'This is some text, (perhaps pulled via $post->post_content). It has a [gallery] shortcode.';
if( has_shortcode( $content, 'gallery' ) ) {
// The content has a [gallery] short code, so this check returned true.
}