Created
January 30, 2015 09:17
-
-
Save igmoweb/672d7ec478589181c08e to your computer and use it in GitHub Desktop.
Generate dynamic CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'plugins_loaded', 'dolly_generate_css_file' ); | |
function dolly_generate_css_file() { | |
if ( isset( $_GET['dolly-styles'] ) && $_GET['dolly-styles'] === 'true' ) { | |
header( 'Content-type: text/css' ); | |
$options = get_option( 'dolly-options' ); | |
?> | |
.mi-clase { | |
background:<?php echo $options['background-color']; ?>; | |
font-size:<?php echo $options['font-size']; ?>px; | |
} | |
<?php | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment