[wp-trac] [WordPress Trac] #21107: wp_register_resource
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 28 21:02:16 UTC 2012
#21107: wp_register_resource
-----------------------------+------------------------------
Reporter: gruvii | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+------------------------------
Comment (by gruvii):
Another example I just saw with this is that I had certain skins using a
font that was implemented using Cufon. So my core has lots of fonts
registered a script like
wp_register_script('font-A','cufon')
wp_register_script('font-B','cufon')
and the skins just do something like
wp_enqueue_script('font-A') if that font is needed.
If I decide to implement the font now using a style so it can use font
embedding or other I have to change all the calls to
wp_enqueue_script('font-A') to wp_enqueue_style('font-A').
If I had used wp_register_resource/wp_enueue_resource I would only have to
modify the wp_register_resource declaration and none of the ways that it
is enqueued.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21107#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list