Shortcodes in comments
-
I see that I can use a simple hook with do_shortcode to add my shortcodes to user comments. This is great. However, not with external files. They don’t get loaded.
(Clearly, this is due to “conditionally_add_scripts_and_styles” function in “shortcode-maker.php” only looking at the post content.)
I’m guessing there’s not a super-easy work-around, but if someone knows of one, please share.
On a buggy side note…
I noticed that you pass the $key to wp_enqueue_script, which ends up preventing loading more than one javascript file per shortcode. Ever think about changing $key to something else? Perhaps the path to the javascript file?
The topic ‘Shortcodes in comments’ is closed to new replies.