[wp-hackers] Minify Scripts and CSS and why it isn't completely possible

Jennifer Hodgdon yahgrp at poplarware.com
Tue Dec 23 17:05:06 GMT 2008


Jacob --

If you want people to use these APIs, would you consider writing up a 
Codex article on "Using the Styles and Scripts APIs"?  If I were 
thinking of using these APIs in my plugins, I would need some 
motivation (why do I want to use the APIs as opposed to whatever else 
I would be doing instead, how do they help my plugin), some 
instruction (how do I use the APIs), hopefully an example or two. As 
we've discussed before on Hackers, PHPDoc isn't the same as an article.

Also, apparently this API was only added to Trunk in May of this year. 
Which WP release was it included in? Is the API stable, or will it be 
overhauled in an incompatible way in an upcoming version of WP? I for 
one don't tend to jump on new features of WP (even if I hear about it, 
and this one I hadn't), as they are rarely stable. Someone will change 
how it works, and my plugin won't work any more, or if I use it, my 
plugin will no longer be compatible with the older version of WP some 
of my users are still using because their other plugins don't work 
with the new version of WP.

Anyway, that is my perspective as to why people aren't using it (which 
was the question you asked to start this thread): no how-to doc and 
it's new.

    --Jennifer

Jacob Santos wrote:
> You can read about the Scripts and Styles API at these locations:
> 
> http://trac.wordpress.org/browser/trunk/wp-includes/class.wp-dependencies.php 
> 
> http://trac.wordpress.org/browser/trunk/wp-includes/functions.wp-styles.php
> http://trac.wordpress.org/browser/trunk/wp-includes/functions.wp-scripts.php 

-- 
Jennifer Hodgdon * Poplar ProductivityWare
www.poplarware.com

Drupal/WordPress Sites, Themes, Modules/Plugins
Custom Web Programming, Web Databases
PHP, Perl, MySQL, JavaScript, XML, AJAX



More information about the wp-hackers mailing list