[wp-hackers] How to enqueue default scrips in footer?
liste at srpski.biz
Tue Dec 29 21:16:30 UTC 2009
I never got this to work. Maybe I don't do actions as I should.
Is there any working example of this? I searched with code example from here
and didn't find anything.
2009/9/26 Andrew Ozz <admin at laptoptips.ca>
> Milan Dinić wrote:
>> Thank you for your answers. Tynan's approach still places it in header
>> Otto's make error (Call to a member function add_data() on a non-object in
> There are actions to specifically enqueue scripts and stylesheets:
> If you really need to change the location of a default script by hand you
> could use:
> $wp_scripts->add_data('handle', 'group', 1 );
> as Otto suggested, where 1 = footer, 0 = head. This has to run after the
> scripts are added/registered but before any scripts are printed, best done
> from the above actions with priority of 11 or more.
> However note that scripts are moved from the footer to the head if a
> dependent script is enqueued there, forcing the default script back to the
> footer would break the dependency.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers