Last Updated: February 25, 2016
·
2.056K
· dannyoutlaw

Create a PHP/CSS file

//Change to appropriate global variable
<?php global $authority; ?>

<style type="text/css">

//Basic CSS can go in here if need be. 
body.custom-background {
background-color: white !important;
}  

//Example of PHP creating CSS
<?php if($authority['center-logo'] == '1') { echo "#logo img {margin: auto;}"; } ?>

</style>

1 Response
Add your response

Not really a best one. You could generate the file by cron and then just include it with the link tag, as usual. This way the CDN can be used, for example.

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

WordPress sites collect scripts from themes, plugins, and tag managers. A compromised plugin update can add a skimmer to every page without a change in your own templates.

Security insights from Cside