|Reported by:||mattwiebe||Owned by:||westi|
|Cc:||mattwiebe, jczorkmid, atimmermans@…|
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.
Change History (13)
- Summary changed from WP_Scripts::do_item before/after actions to WP_Scripts::do_item filter
- Keywords 3.2-early added
- Owner set to westi
- Status changed from new to accepted