[wp-trac] [WordPress Trac] #14853: WP_Scripts::do_item before/after actions

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 12 04:36:00 UTC 2010


#14853: WP_Scripts::do_item before/after actions
-------------------------+--------------------------------------------------
 Reporter:  mattwiebe    |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  3.1            
 Severity:  normal       |    Keywords:                 
-------------------------+--------------------------------------------------
 There should be actions that fire after a script is printed. This would
 enabled this best-practices usage scenario (from
 http://github.com/paulirish/html5-boilerplate/blob/master/index.html ):

 {{{
 <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
   <script
 src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
   <script>!window.jQuery && document.write('<script
 src="js/jquery-1.4.2.min.js"><\/script>')</script>
 }}}

 The before action isn't covered by that use-case, but if we're going to
 have an after action, we might as well have a before one.

 I've attached a patch that would allow for this. Dead simple.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14853>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list