PHP generated CSS
-
Hi, could it be possible to get this plugin to run PHP to generate a CSS file?
<?php header("Content-type: text/css;"); $current_url = dirname(__FILE__); $wp_content_pos = strpos($current_url, 'wp-content'); $wp_content = substr($current_url, 0, $wp_content_pos); require_once($wp_content . 'wp-load.php'); ?> <?php /* General Color */ ?> <?php $site_gc = ot_get_option('general_color'); ?> .quote-start, a:hover, .person-title, .quote-author, .service-box i, .wp-pagenavi a:hover, .wp-pagenavi span.current, .su-fancy-link:hover, ul.pf-filter li.active a, .su-tabs-nav span.su-tabs-current .su-tab-icon, .su-tabs-nav span:hover .su-tab-icon, .su-tabs .pane-wrapper .pane-title:hover .su-tab-icon, .su-tabs .pane-wrapper .pane-title.su-tabs-current .su-tab-icon, .su-spoiler-title .spoiler-button.spoiler-active, .su-spoiler-title:hover .spoiler-button, .widget_side_menu ul li.current-menu-item a {color:<?php echo $site_gc; ?>;} (etc)
It’s basically a custom CSS file generated by picking out settings set under the admin. Such as the theme colors, font sizes, etc. It could be generated just once and then cached for the visitors as a static, as it’s not dynamically changing all the time.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘PHP generated CSS’ is closed to new replies.