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

Jacob Santos wordpress at santosj.name
Tue Dec 23 14:19:00 GMT 2008


It has never been true that you shouldn't use functions that start with 
wp_. Whoever said that to you was either lying or was or still is a fool.

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

Ignore the suggestion to read WP_Scripts::add() and WP_Styles::add(). 
That method is actually part of WP_Dependencies. I suppose an article on 
the Codex might also help it seems.

You'll probably want to enqueue scripts and styles, but you can also 
register them.

Jacob Santos

dave jaggy wrote:
> By the way, what exactly is meant under Scripts and Styles API?
> wp_enqueue_script and wp_enqueue_style? Is there anything more? How I can
> read about that, if - yes.
>
> And I guess there was somewhere mentioned that one shouldn't use function
> starting with wp_, is it still true?
>
> Dave
>
>
> On Tue, Dec 23, 2008 at 4:08 PM, Viper007Bond <viper at viper007bond.com>wrote:
>
>   
>> On Mon, Dec 22, 2008 at 7:27 PM, Jacob Santos <wordpress at santosj.name
>>     
>>> wrote:
>>>       
>>> Why don't more plugin and theme authors use the Scripts and Styles API?
>>>       
>> Because it's relatively new and not all plugin authors are good coders.
>>
>> --
>> Viper007Bond | http://www.viper007bond.com/ | http://www.finalgear.com/
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>     
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>   



More information about the wp-hackers mailing list