[wp-hackers] checking if post has shortcode, before header is output?

Ken Newman Ken at adcSTUDIO.com
Mon Oct 26 20:30:28 UTC 2009

In HTML 5, the <style> element being using in the body is valid if you use 
the "scoped" attribute :)

From: "Kevin Newman" <CaptainN at unFocus.com>

> Hello,
> Is there anyway to check if there your registered shortcode (for a plugin) 
> is being used in the current post, during some action hook before the 
> header is output? The idea would be to include CSS and JS files for the 
> shortcode, only on pages that actually use the shortcode. I'm doing it 
> inline right now, since wp_enqueue_script is not available where the 
> shortcode is dealt with.
> Thanks,
> Kevin N.

More information about the wp-hackers mailing list