[wp-hackers] wp-config.php, wp-load.php, and ABSPATH
Ozh
ozh at planetozh.com
Tue Sep 15 13:22:46 UTC 2009
> Soo... either do the "wrong" thing by not using enqueue, or do the
> "wrong" thing by direct-loading wp-config.php. I don't personally
> see any harm in bypassing enqueue in such cases, but there are some
> seriously mixed signals going on.... :-\
There's another half baked solution
Instead of including wp-config.php in your custom.css.php and fire WP a
second time, you can simply pass a number of parameters you need in your
CSS
Something like
$options = get_option('my_plugin');
$color1 = $options['color1'];
$color2 = $options['color2'];
$width = $options['width'];
wp_enqueue_script('my_plugin',
$path."/custom.css.php?color1=$color1&etc..");
Depending on how many variables the custom CSS needs to know this can be
easier to do
Ozh
More information about the wp-hackers
mailing list