[wp-hackers] wp_enqueue_script() and URLs with 2+ parameters
Glenn Ansley
glenn at glennansley.com
Fri Feb 27 19:41:59 GMT 2009
>To fix this in current WordPress, filter 'script_loader_src'
I believe this is too early. Whatever you output from
script_loader_src will still be cleaned by clean_url(). Correct? (i'm
not testing as i respond)
>Why is it that, in order to use wp_enqueue_script in a theme, you have to hook it to wp_head?
I hook into init because it needs to be included before scripts are
printed (wp_print_scripts)
Glenn Ansley
WordPress Pluign Development
http://fullthrottledevelopment.com
On Fri, Feb 27, 2009 at 2:34 PM, Nathan Rice <ncrice at gmail.com> wrote:
> This is kinda unrelated, but I've always wondered about this ...
>
> Why is it that, in order to use wp_enqueue_script in a theme, you have to
> hook it to wp_head? If I create my own action, and try to hook it to that,
> it won't work (at least, it won't work if you call that action before
> wp_head in your header.php file).
>
> I've always wondered about that.
>
> Nathan
>
>
> My Website
> http://www.nathanrice.net/
>
> My Twitter
> http://twitter.com/nathanrice
>
>
> On Fri, Feb 27, 2009 at 2:30 PM, Austin Matzko <if.website at gmail.com> wrote:
>
>> On Fri, Feb 27, 2009 at 1:26 PM, Mike Schinkel
>> <mikeschinkel at newclarity.net> wrote:
>> > So is the filter to use 'clean_url', or something else?
>>
>> To fix this in current WordPress, filter 'script_loader_src'
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list