Path : /home/vishqocm/vishalwebtech.in/blog/wp-content/themes/katerio/functions/
File Upload :
Current File : /home/vishqocm/vishalwebtech.in///blog/wp-content/themes/katerio/functions/dynamic-css.php

<?php
/**
 * Dynamic CSS
 *
 * @package Katerio
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * -----------------------------------------------------------------------------
 *  Dynamic CSS of general elements
 * -----------------------------------------------------------------------------
 */
if ( ! function_exists( 'th90_dynamic_css' ) ) {

	function th90_dynamic_css() {
		$out = '';

        foreach ( get_categories() as $cat ) {
            $cat_color = th90_field_single( 'category_color', 'term_' . $cat->term_id );

            if ( $cat_color ) {
				$out .= '.site .button.post-cat.btn-color.post-cat-' . $cat->term_id . ' {
                    background-color: ' . $cat_color . ';
                    border-color: ' . $cat_color . ';
                }
                .site .button.post-cat.btn-line_color.post-cat-' . $cat->term_id . ' {
                    border-color: ' . $cat_color . ';
                    color: ' . $cat_color . ';
                }
                .site .button.post-cat.btn-text_color.post-cat-' . $cat->term_id . ' {
                    color: ' . $cat_color . ';
                }';
			}
        }

    }
}