I have some PHP variables that each represent some user settings set via a theme options interface such as:
- theme colors
- typography
- etc.
All these variables are in a file called dynamic-style.php
:
<?php
<style type="text/css">
body {
color: <?php echo $text_color; ?>;
}
</style>
?>
Is there a way to get the parsed CSS code from dynamic-style.php
and save it to the main style.css
at the bottom of the file? I need this to be done to decrease the number of HTTP requests on a public theme.
Thank you.