« Return to Thread: checking if post has shortcode, before header is output?

Re: checking if post has shortcode, before header is output?

by Austin Matzko :: Rate this Message:

| View in Thread

On Mon, Oct 26, 2009 at 1:59 PM, Aaron D. Campbell <aaron@...> wrote:
> I still think it would be better to add the JS from the shortcode handler
> rather than trying to mess with the_content, the_post, $wp_query, $post,
> etc.  Since it's enqueued inside the shortcode handler you KNOW the
> shortcode is being executed.  The only drawback is that the JS needs to go
> in the footer rather than the header, but as far as I know this is actually
> the recommended way of loading JS so you should code for that anyway.

That's probably the best way for JavaScript, but valid CSS <style>
elements are supposed to be in <head>.
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

 « Return to Thread: checking if post has shortcode, before header is output?