[wp-hackers] wp-config.php, wp-load.php, and ABSPATH
kontakt at joernroeder.de
Tue Sep 15 08:58:48 UTC 2009
I think, you can…
i try this:
- create style.css.php
-embed new styles
@charset '<?php bloginfo('charset') ?>';
content:'<?php bloginfo('name'); ?>'
I don't now if there are any problems with caching, but you can read
this article on smashingmagazine about php and css. Maybee it will
Am 15.09.2009 um 08:13 schrieb Andrew Ozz:
> Stephen Rider wrote:
>> Okay then, here's an example that probably comes up a lot in plugins.
>> I want to make a CSS file that gets some of its stuff from PHP. So
>> "mystyles.css.php". Most of it is a simple echo, but a few things
>> in the stylesheet are pulled from settings on the wp_settings table
>> in the database.
>> The CSS/PHP file is pulled directly by the browser and is thus not
>> "WP Aware". How would I get that file to access the WP database?
> Short answer: you can't. Best option is to add a normal stylesheet
> and then output any bits that depend on the db in a <style> tag
> after that. This way WordPress won't run twice on each page load
> (once to generate the HTML, second time to generate the stylesheet).
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers