[wp-trac] [WordPress Trac] #12641: Move JavaScript to the bottom of the page in TwentyTen theme

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 19 10:02:25 UTC 2010


#12641: Move JavaScript to the bottom of the page in TwentyTen theme
-------------------------+--------------------------------------------------
 Reporter:  josephscott  |       Owner:           
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  3.0      
Component:  Themes       |     Version:  3.0      
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------

Comment(by Viper007Bond):

 Replying to [comment:3 TobiasBg]:
 > Shouldn't we just add the {{{$in_footer = true}}} parameter to the
 arguments of the {{{wp_enqueue_script( 'comment-reply' )}}} (or rather the
 corresponding {{{wp_register_script}}}) call to have the script load in
 the footer?
 >
 > I guess that would be the proper way to do it, instead of that slightly
 hacky {{{wp_print_scripts}}} approach, which can have downsides due to the
 included filter being called again (scribu knows more about this :-) ).

 Filters should be smart. A few of my plugins call `wp_print_scripts()`.

 Anyway, I considered this as well but was a bit worried that it could
 break other themes possibly.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12641#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list