[wp-trac] [WordPress Trac] #11923: Allow supressing the hook in wp_print_(script|style)()

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 18 23:57:08 UTC 2010


#11923: Allow supressing the hook in wp_print_(script|style)()
------------------------------+---------------------------------------------
 Reporter:  scribu            |        Owner:  azaozz    
     Type:  enhancement       |       Status:  closed    
 Priority:  normal            |    Milestone:            
Component:  JavaScript        |      Version:            
 Severity:  normal            |   Resolution:  worksforme
 Keywords:  has-patch commit  |  
------------------------------+---------------------------------------------
Changes (by scribu):

  * status:  new => closed
  * resolution:  => worksforme
  * milestone:  3.0 =>


Comment:

 Replying to [comment:4 archon810]:
 > Just to clarify, the duplicate javascript code would be the result of
 the queue getting flushed and then potentially filled again with the same
 scripts, right (as far as I remember, the queue is emptied when it's
 printed)?

 Actually, no. You can call wp_print_scripts() as many times as you want,
 and you won't get duplicate scripts.

 I was thinking of plugins doing other stuff, like manually outputing
 <script> tags, but that would be foolish.

 So I guess there's nothing to worry about.


 > Wouldn't the ideal solution be to call a wp_print_scripts() again in the
 footer to flush out everything queued up for it? This way you don't have
 to manually call wp_print_scripts().

 Yes, that would be the ideal solution. I'll open a new ticket for that.

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


More information about the wp-trac mailing list