[wp-hackers] Re: wp-hackers Digest, Vol 51, Issue 15
Michael Toppa
public at toppa.com
Wed Apr 8 11:43:21 GMT 2009
Thanks for the replies from scribu and Nathan. I updated the codex page
for wp_enqueue_script with a more detailed example and more guidance on
which hooks to use.
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
One thing I was hesitant to change was the src parameter info - it
specifically says to use a URL that's relative to the root of the
wordpress installation. Both scribu and Nathan said that a full URL is
fine, and that did work fine for me. Can anyone confirm if this is by
accident or design? If the advise in the codex is wrong, then I'll
update it on that point too.
Mike T
> ------------------------------
>
> Message: 2
> Date: Mon, 6 Apr 2009 17:10:38 +0300
> From: scribu <scribu at gmail.com>
> Subject: Re: [wp-hackers] questions on best practices for
> wp_enqueue_script and wp_enqueue_style
> To: wp-hackers at lists.automattic.com
> Message-ID:
> <349fe48b0904060710rd85cb10s392f64daa648fbb8 at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> 1. About using template_redirect:
>
> DD32:
>
> [template_redirect] is one of the easiest filters to use after WP has loaded
> and parsed everything, and is ready to start outputting. when this action
> fires, Plugins have everything at their disposal, and the theme hasnt
> displayed anything yet, Very useful time to inspect and redirect if need be,
> or to enqueue stuff that'll be needed (since you can see the posts now)
>
>
> 2. You can use get_bloginfo('template_url').
>
> --
> http://scribu.net
>
>
>
More information about the wp-hackers
mailing list