[wp-hackers] Adding A CSS Loader

Jamie Holly hovercrafter at earthlink.net
Mon Apr 23 14:11:17 GMT 2007


> 
> How would there not be compatibility issues? As far as I can see,
> plugins would have to do:
> 
> if ( function_exists('add_css') ) {
>     add_css('foo.css');
> } else {
>     function foo_wp_head() {
>         echo '<link rel="stylesheet" href="foo.css" type="text/css"
> />';
>     }
>     add_action('wp_head', 'foo_wp_head');
> }
> 
> If they wanted to be compatible with <2.3 (or whenever we put this in).
> 
> 
> --
> Rob

In that sense then yeah there would be an issue. I was talking about someone
using a plugin that was written in a version prior to the implementation.
Say we put it in version 2.5 (3.0 would be more likely), then plugins that
are authored for that version wouldn't work in 2.X, unless they added the
above check. However - plugins authored pre-loader would still work in WP
with the loader due to the head hook. 


Jamie Holly
http://www.intoxination.net



More information about the wp-hackers mailing list