[wp-trac] Re: [WordPress Trac] #9346: wp_enqueue_script() doesn't
work mid-page for footer scripts
WordPress Trac
wp-trac at lists.automattic.com
Sun May 10 14:54:17 GMT 2009
#9346: wp_enqueue_script() doesn't work mid-page for footer scripts
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: azaozz
Type: enhancement | Status: new
Priority: lowest | Milestone: 2.8
Component: JavaScript | Version: 2.8
Severity: minor | Keywords: has-patch tested
--------------------------+-------------------------------------------------
Changes (by Denis-de-Bernardy):
* keywords: needs-patch => has-patch tested
* milestone: Future Release => 2.8
Comment:
Attached patch does the trick. tested with a footer script that required
recursive depends including a few that should go in the header.
Before the patch: nothing gets added at all.
After the patch:
- all depends (including recursively needed depends) get added in the
footer if none is previously added
- already included depends do not get added as expected
Potential issues I can think of:
- localized scripts (should work fine)
- scripts that really should be in the header, but I think it is the
plugin author's job to make sure his scripts work.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9346#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list