[wp-hackers] [ wp-hackers ] wp _ enqueue _ script() not working while in the Loop

scribu scribu at gmail.com
Sun Dec 20 11:56:26 UTC 2009


You can already do this. See the last param for wp_enqueue_script().

On 12/20/09, Joe Hoyle <joehoyle at gmail.com> wrote:
> Is there a trac ticket for being able to enqueue in the footer after
> wp_head? Or are there reasons why this would not be a good idea?
>
>
> Joe Hoyle
>
> www.joehoyle.co.uk
> joehoyle at gmail.com
> +44 (0)7891 685 613
>
>
>
> On 17 Dec 2009, at 15:03, scribu wrote:
>
>> You're welcome. :)
>>
>> I don't use wp_print_scripts() because some other plugins might have
>> inline
>> scripts printed using the 'wp_print_scripts' hook.
>>
>>
>> On Thu, Dec 17, 2009 at 2:46 PM, TobiasBg
>> <wp-hackers at tobias.baethge.com>wrote:
>>
>>> Hi,
>>>
>>>> That's why I use $wp_scripts->do_items(). It makes sure the same script
>>>> isn't included twice. You just have to make sure you use the same handle
>>> for
>>>> both plugins.
>>>
>>> Argh, stupid me. Of course it does (and so does its wrapper
>>> wp_print_scripts, that I prefer to use). I just had a typo in one of the
>>> handles... Thanks for pointing me to it!
>>>
>>
>>
>> --
>> http://scribu.net
>> _______________________________________________
>> 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
>


-- 
http://scribu.net


More information about the wp-hackers mailing list