[wp-trac] Re: [WordPress Trac] #3372: Consolidated JavaScript/CSS
Plugin API
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 20 00:27:24 GMT 2006
#3372: Consolidated JavaScript/CSS Plugin API
-----------------------------+----------------------------------------------
Reporter: robertaccettura | Owner: anonymous
Type: enhancement | Status: new
Priority: low | Milestone: 2.2
Component: Optimization | Version: 2.1
Severity: minor | Resolution:
Keywords: |
-----------------------------+----------------------------------------------
Comment (by RuddO):
This is a GREAT idea!
And it would also free plugin writers from having to do the wp-
content/plugins/plugin_basename(__FILE__) chicanery.
All that's needed, in my opinion, would be functions "plugin_add_css",
"plugin_add_js", and then on wp_head() WP can inject an URL that points to
an internal file which releases the added CSS and JS. This function could
be loaded as part of the plugin initialization trigger (can't recall its
name right now).
This has definitive advantages to feeding JS and CSS inline on wp_head()
directly.
Note that, due to the nature of the requests, it's impossible to make
distinctions based on which page the reader is visiting, because the
custom CSS and JS is released to the browser separately from the original
request.
--
Ticket URL: <http://trac.wordpress.org/ticket/3372#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list