ico@italyisfalling.com
Member
Posted 3 years ago #
Do any of you guys have any idea how to check what shortcodes are active or not?
I tried with global $shortcode_tags, but I cannot get sprintf to output the structure and content of that array, and in fact array_keys or in_array seem to be ineffective.
it is for a plugin I am working on. Any suggestion will be highly appreciated.
This worked for me:
<?php
global $shortcode_tags;
echo "<pre>"; print_r($shortcode_tags); echo "</pre>";
?>
Resource:
Shortcode_API
ico@italyisfalling.com
Member
Posted 3 years ago #
Thanks, that worked to output the array (I was using the wrong method).
Yet I am baffled because some of the shortcodes that are supposed to be there aren't.
For example, nextgen shortcodes do not appear at all in the array, yet they seem to be created by the plugin with the regular add-shortcode method.
Any idea why?
Total guess here that those shortcodes aren't being registered properly or only get registered under certain circumstances. Alex (authour of NextGen) is pretty active in the forums regarding that plugin so will put that plugin in the tags and maybe he can answer.