Advertisement
Guest User

Untitled

a guest
May 18th, 2021
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 48.76 KB | None | 0 0
  1. <?php
  2. /**
  3.  * color scheme
  4.  *
  5.  * @package Theme
  6.  */
  7.  
  8. // Prevent direct script access.
  9. if ( ! defined( 'ABSPATH' ) ) {
  10.     die( 'No direct script access allowed' );
  11. }
  12.  
  13. final class Design_Scheme {
  14.  
  15.     /**
  16.      * Holds class single instance
  17.      * @var null
  18.      */
  19.     private static $_instance = null;
  20.  
  21.     /**
  22.      * Get instance
  23.      * @return Design_Scheme|null
  24.      */
  25.     public static function get_instance() {
  26.  
  27.         if (null == static::$_instance) {
  28.             static::$_instance = new self();
  29.         }
  30.  
  31.         return static::$_instance;
  32.  
  33.     }
  34.  
  35.     /**
  36.      * Design_Scheme constructor.
  37.      */
  38.     private function __construct() {
  39.         $this->hooks();
  40.     }
  41.  
  42.     /**
  43.      * A dummy magic method to prevent Design_Scheme from being cloned.
  44.      *
  45.      */
  46.     public function __clone() {
  47.         throw new Exception('Cloning ' . __CLASS__ . ' is forbidden');
  48.     }
  49.  
  50.     /**
  51.      * Setup Hooks
  52.      */
  53.     public function hooks() {
  54.         add_action( 'wp_enqueue_scripts', array( $this, 'header_style_css' ), 11 );
  55.         add_action( 'wp_enqueue_scripts', array( $this, 'footer_style_css' ), 11 );
  56.         add_action( 'wp_enqueue_scripts', array( $this, 'global_style_css' ), 11 );
  57.         add_action( 'wp_enqueue_scripts', array( $this, 'badges_style_css' ), 11 );
  58.         add_action( 'wp_head', array( $this, 'set_mobile_address_bar_color' ) );
  59.     }
  60.  
  61.     /**
  62.      * Enqueue front-end CSS for header styles
  63.      *
  64.      * @see wp_add_inline_style()
  65.      */
  66.     public function header_style_css() {
  67.  
  68.         $set = get_theme_options_set( array(
  69.             'header_design_site_title_color',
  70.             'design_content_background_color',
  71.             'header_design_top_background_color',
  72.             'header_design_top_gradient_color',
  73.             'header_design_top_text_color',
  74.             'header_design_top_text_hover_color',
  75.             'header_typography_top_menu_configuration',
  76.             'header_typography_top_menu',
  77.             'header_design_bottom_background_color',
  78.             'header_design_bottom_gradient_color',
  79.             'header_design_bottom_text_color',
  80.             'header_design_bottom_text_hover_color',
  81.             'header_typography_bottom_menu_configuration',
  82.             'header_typography_bottom_menu',
  83.             'header_typography_sub_menu_configuration',
  84.             'header_typography_sub_menu',
  85.             'header_design_button_background_color',
  86.             'header_design_button_text_color',
  87.             'header_layout_logo_position',
  88.             'mobile_header_bg_color',
  89.             'mobile_header_text_color',
  90.             'mobile_header_gradient_color',
  91.             'header_layout_logo_margin_top',
  92.             'header_layout_logo_margin_bottom',
  93.             'mobile_header_logo_margin_top',
  94.             'mobile_header_logo_margin_bottom'
  95.         ) );
  96.  
  97.         /***** top menu inheritance */
  98.         if( 'inherit' == $set['header_typography_top_menu_configuration'] ) {
  99.             $set[ 'header_typography_top_menu' ] = array(
  100.                 'font-family'    => 'inherit',
  101.                 'font-size'      => 'inherit',
  102.                 'font-style'     => 'inherit',
  103.                 'font-weight'    => 'inherit',
  104.                 'letter-spacing' => 'inherit',
  105.                 'text-transform' => 'inherit',
  106.             );
  107.         } else {
  108.             $set[ 'header_typography_top_menu' ][ 'font-family' ] = htmlspecialchars_decode( $set[ 'header_typography_top_menu' ][ 'font-family' ] );
  109.             $set[ 'header_typography_top_menu' ][ 'font-size' ] = str_replace( 'pxpx', 'px', ( $set[ 'header_typography_top_menu' ][ 'font-size' ] . 'px' ) );
  110.             $set[ 'header_typography_top_menu' ][ 'letter-spacing' ] = str_replace( 'pxpx', 'px', ( $set[ 'header_typography_top_menu' ][ 'letter-spacing' ] . 'px' ) );
  111.             if( 'inherit' == $set[ 'header_typography_top_menu' ][ 'font-family' ] ) {
  112.                 $set['header_typography_top_menu']['font-style']  = 'inherit';
  113.                 $set['header_typography_top_menu']['font-weight'] = 'inherit';
  114.             }
  115.         }
  116.  
  117.         /***** bottom menu inheritance */
  118.         if( 'inherit' == $set['header_typography_bottom_menu_configuration'] ) {
  119.             $set[ 'header_typography_bottom_menu' ] = array(
  120.                 'font-family'    => 'inherit',
  121.                 'font-size'      => 'inherit',
  122.                 'font-style'     => 'inherit',
  123.                 'font-weight'    => 'inherit',
  124.                 'letter-spacing' => 'inherit',
  125.                 'text-transform' => 'inherit',
  126.             );
  127.         } else {
  128.             $set[ 'header_typography_bottom_menu' ][ 'font-family' ] = htmlspecialchars_decode( $set[ 'header_typography_bottom_menu' ][ 'font-family' ] );
  129.             $set[ 'header_typography_bottom_menu' ][ 'font-size' ] = str_replace( 'pxpx', 'px', ( $set[ 'header_typography_bottom_menu' ][ 'font-size' ] . 'px' ) );
  130.             $set[ 'header_typography_bottom_menu' ][ 'letter-spacing' ] = str_replace( 'pxpx', 'px', ( $set[ 'header_typography_bottom_menu' ][ 'letter-spacing' ] . 'px' ) );
  131.             if( 'inherit' == $set[ 'header_typography_bottom_menu' ][ 'font-family' ] ) {
  132.                 $set['header_typography_bottom_menu']['font-style']  = 'inherit';
  133.                 $set['header_typography_bottom_menu']['font-weight'] = 'inherit';
  134.             }
  135.         }
  136.  
  137.         /***** sub menu inheritance */
  138.         if( 'inherit' == $set['header_typography_sub_menu_configuration'] ) {
  139.             $set[ 'header_typography_sub_menu' ] = array(
  140.                 'font-family'    => 'inherit',
  141.                 'font-size'      => '14px',
  142.                 'font-style'     => 'inherit',
  143.                 'font-weight'    => 500,
  144.                 'letter-spacing' => 'inherit',
  145.                 'text-transform' => 'inherit',
  146.             );
  147.         } else {
  148.             $set[ 'header_typography_sub_menu' ][ 'font-family' ] = htmlspecialchars_decode( $set[ 'header_typography_sub_menu' ][ 'font-family' ] );
  149.             $set[ 'header_typography_sub_menu' ][ 'font-size' ] = str_replace( 'pxpx', 'px', ( $set[ 'header_typography_sub_menu' ][ 'font-size' ] . 'px' ) );
  150.             $set[ 'header_typography_sub_menu' ][ 'letter-spacing' ] = str_replace( 'pxpx', 'px', ( $set[ 'header_typography_sub_menu' ][ 'letter-spacing' ] . 'px' ) );
  151.         }
  152.  
  153.         $options = array(
  154.             'site_title_clr' => $set['header_design_site_title_color'],
  155.             'content_bg_clr' => $set['design_content_background_color'],
  156.             'logo'           => array(
  157.                 'margin_top'    => $set[ 'header_layout_logo_margin_top' ],
  158.                 'margin_bottom' => $set[ 'header_layout_logo_margin_bottom' ]
  159.             ),
  160.             'top' => array(
  161.                 'bg_clr' => $set['header_design_top_background_color'],
  162.                 'gr_clr' => $set['header_design_top_gradient_color'],
  163.                 'text_clr'  => $set['header_design_top_text_color'],
  164.                 'text_hover_clr' => $set['header_design_top_text_hover_color'],
  165.                 'typography' => array(
  166.                     'main_nav' => $set['header_typography_top_menu'],
  167.                     'sub_nav'  => $set['header_typography_sub_menu'],
  168.                 )
  169.             ),
  170.             'bottom' => array(
  171.                 'bg_clr' => $set['header_design_bottom_background_color'],
  172.                 'gr_clr' => $set['header_design_bottom_gradient_color'],
  173.                 'text_clr' => $set['header_design_bottom_text_color'],
  174.                 'text_hover_clr' => $set['header_design_bottom_text_hover_color'],
  175.                 'typography' => array(
  176.                     'main_nav' => $set['header_typography_bottom_menu'],
  177.                     'sub_nav'  => $set['header_typography_sub_menu'],
  178.                 )
  179.             ),
  180.             'button' => array(
  181.                 'bg_clr' => $set['header_design_button_background_color'],
  182.                 'text_clr' => $set['header_design_button_text_color'],
  183.             ),
  184.             'mobile' => array(
  185.                 'header_logo_width' => '200px', //todo 2.0.1: Set this value from customizer
  186.                 'header_breakpoint' => '992px', //todo 2.0.1: Set this value from customizer
  187.                 'header_bg_clr'     => $set['mobile_header_bg_color'],
  188.                 'header_gr_clr'     => $set['mobile_header_gradient_color'],
  189.                 'header_text_clr'   => $set['mobile_header_text_color'],
  190.                 'logo'           => array(
  191.                     'margin_top'    => $set[ 'mobile_header_logo_margin_top' ],
  192.                     'margin_bottom' => $set[ 'mobile_header_logo_margin_bottom' ]
  193.                 )
  194.             )
  195.         );
  196.  
  197.         $fonts_helper = Fonts_Helper::get_instance();
  198.         $css = '';
  199.  
  200.         /***** Header top layer gradient */
  201.         if( $options['top']['gr_clr'] ) {
  202.             $css .= '/* -- Header Gradient For Top Layer -- */
  203.         .bb-header.header-desktop .top-header {
  204.             background: %2$s;
  205.             background: -webkit-linear-gradient(20deg, %2$s, %38$s);
  206.             background: -o-linear-gradient(20deg, %2$s, %38$s);
  207.             background: -moz-linear-gradient(20deg, %2$s, %38$s);
  208.             background: linear-gradient(20deg, %2$s, %38$s);
  209.         }';
  210.         }
  211.  
  212.         /***** Header bottom layer gradient */
  213.         if( $options['bottom']['gr_clr'] ) {
  214.             $css .= '/* -- Header Gradient For Bottom Layer -- */
  215.         .bb-header.header-desktop .bottom-header {
  216.             background: %3$s;
  217.             background: -webkit-linear-gradient(20deg, %3$s, %39$s);
  218.             background: -o-linear-gradient(20deg, %3$s, %39$s);
  219.             background: -moz-linear-gradient(20deg, %3$s, %39$s);
  220.             background: linear-gradient(20deg, %3$s, %39$s);
  221.         }';
  222.         }
  223.  
  224.         /***** Mobile header gradient */
  225.         if( $options['mobile']['header_gr_clr'] ) {
  226.             $css .= '/* -- Header Gradient for Mobile -- */
  227.         .bb-header.header-mobile .header-row {
  228.             background: %12$s;
  229.             background: -webkit-linear-gradient(20deg, %12$s, %40$s);
  230.             background: -o-linear-gradient(20deg, %12$s, %40$s);
  231.             background: -moz-linear-gradient(20deg, %12$s, %40$s);
  232.             background: linear-gradient(20deg, %12$s, %40$s);
  233.         }';
  234.         }
  235.  
  236.         $css .= '
  237.         /* -- Mobile Header -- */
  238.         .bb-header.header-mobile .header-row {
  239.             background-color: %12$s;
  240.             color: %13$s;
  241.         }
  242.         /* If you need to specify different color for bottom/top header, use this code */
  243.         .bb-header.header-mobile.g-style .header-c {
  244.             color: %13$s;
  245.         }
  246.         /* Mobile header breakpoint */
  247.         @media (min-width: %11$s) {
  248.             .bb-show-desktop-header {
  249.               display: block;
  250.             }
  251.             .bb-show-mobile-header {
  252.               display: none;
  253.             }
  254.         }
  255.    
  256.         /* --site title color */
  257.         .branding h1 {
  258.           color: %1$s;
  259.         }
  260.    
  261.         /* -top */
  262.         .bb-header.header-desktop .top-header {
  263.           background-color: %2$s;
  264.         }
  265.    
  266.         .bb-header.header-desktop .top-header .bb-header-icon:hover,
  267.         .bb-header.header-desktop .top-header  .bb-header-icon.active,
  268.         .bb-header.header-desktop .top-header .main-navigation > ul > li:hover,
  269.         .bb-header.header-desktop .top-header .main-navigation > ul > li.current-menu-item > a {
  270.           color: %5$s;
  271.         }
  272.    
  273.         /* --top pattern */
  274.         .bb-header.header-desktop .top-header svg {
  275.           fill: %2$s;
  276.         }
  277.    
  278.         /* --top text color */
  279.         .bb-header.header-desktop .top-header {
  280.           color: %4$s;
  281.         }
  282.    
  283.         .bb-header.header-desktop .top-header .create-post {
  284.           background-color: %8$s;
  285.         }
  286.    
  287.         /* --top button color */
  288.         .bb-header.header-desktop .top-header .create-post {
  289.           color: %9$s;
  290.         }
  291.        
  292.         /* --top Typography */
  293.         .bb-header.header-desktop .top-header .main-navigation {
  294.             %14$s
  295.             font-size: %15$s;
  296.             font-style : %16$s;
  297.             font-weight: %17$s;
  298.             letter-spacing: %18$s;
  299.             text-transform: %19$s;
  300.         }
  301.        
  302.         .bb-header.header-desktop .top-header .main-navigation .sub-menu {
  303.             %20$s
  304.             font-size: %21$s;
  305.             font-style : %22$s;
  306.             font-weight: %23$s;
  307.             letter-spacing: %24$s;
  308.             text-transform: %25$s;
  309.         }
  310.    
  311.         .bb-header.header-desktop .bottom-header .bb-header-icon:hover,
  312.         .bb-header.header-desktop .bottom-header .bb-header-icon.active,
  313.         .bb-header.header-desktop .bottom-header .main-navigation > ul > li:hover,
  314.         .bb-header.header-desktop .bottom-header .main-navigation > ul > li.current-menu-item > a,
  315.         .bb-header.header-desktop .bottom-header .main-navigation > ul > li.current-menu-item > .dropdown-toggle {
  316.           color: %7$s;
  317.         }
  318.    
  319.         /* -bottom */
  320.         .bb-header.header-desktop .bottom-header {
  321.           background-color: %3$s;
  322.         }
  323.    
  324.         .bb-header.header-desktop .bottom-header svg {
  325.           fill: %3$s;
  326.         }
  327.    
  328.         /* --bottom text color */
  329.         .bb-header.header-desktop .bottom-header {
  330.           color: %6$s;
  331.         }
  332.    
  333.         .bb-header.header-desktop .bottom-header .main-navigation ul li:before,
  334.         .bb-header.header-desktop .bottom-header .account-box .user:after,
  335.         .bb-header.header-desktop .bottom-header .create-post:before,
  336.         .bb-header.header-desktop .bottom-header .menu-button:after {
  337.           border-color: %6$s;
  338.         }
  339.    
  340.         .bb-header.header-desktop .bottom-header .create-post {
  341.           background-color: %8$s;
  342.         }
  343.    
  344.         /* --bottom button color */
  345.         .bb-header.header-desktop .create-post {
  346.           color: %9$s;
  347.         }
  348.        
  349.         /* --bottom Typography */
  350.         .bb-header.header-desktop .bottom-header .main-navigation {
  351.             %26$s
  352.             font-size: %27$s;
  353.             font-style : %28$s;
  354.             font-weight: %29$s;
  355.             letter-spacing: %30$s;
  356.             text-transform: %31$s;
  357.         }
  358.        
  359.         .bb-header.header-desktop .bottom-header .main-navigation .sub-menu {
  360.             %32$s
  361.             font-size: %33$s;
  362.             font-style : %34$s;
  363.             font-weight: %35$s;
  364.             letter-spacing: %36$s;
  365.             text-transform: %37$s;
  366.         }
  367.  
  368.         /* -- Logo Margin for Desktop */
  369.         .bb-header.header-desktop .branding {
  370.             margin-top: %41$dpx;
  371.             margin-bottom: %42$dpx;
  372.         }
  373.         /* -- Logo Margin for Mobile */
  374.         .bb-header.header-mobile .branding {
  375.             margin-top: %43$dpx;
  376.             margin-bottom: %44$dpx;
  377.         }
  378.         ';
  379.  
  380.         wp_add_inline_style( 'primary-style',
  381.             sprintf(
  382.                 $css,
  383.                 /* -1- */
  384.                 $options['site_title_clr'],
  385.                 /* -2- */
  386.                 $options['top']['bg_clr'],
  387.                 /* -3- */
  388.                 $options['bottom']['bg_clr'],
  389.                 /* -4- */
  390.                 $options['top']['text_clr'],
  391.                 /* -5- */
  392.                 $options['top']['text_hover_clr'],
  393.                 /* -6- */
  394.                 $options['bottom']['text_clr'],
  395.                 /* -7- */
  396.                 $options['bottom']['text_hover_clr'],
  397.                 /* -8- */
  398.                 $options['button']['bg_clr'],
  399.                 /* -9- */
  400.                 $options['button']['text_clr'],
  401.                 /* -10- */
  402.                 $options['content_bg_clr'],
  403.                 /* -11- */
  404.                 $options['mobile']['header_breakpoint'],
  405.                 /* -12- */
  406.                 $options['mobile']['header_bg_clr'],
  407.                 /* -13- */
  408.                 $options['mobile']['header_text_clr'],
  409.                 /* -14- */
  410.                 $fonts_helper->generate_inline_css_font_family( $options['top']['typography']['main_nav']['font-family'], 'sans-serif' ),
  411.                 /* -15- */
  412.                 $options['top']['typography']['main_nav']['font-size'],
  413.                 /* -16- */
  414.                 $options['top']['typography']['main_nav']['font-style'],
  415.                 /* -17- */
  416.                 $options['top']['typography']['main_nav']['font-weight'],
  417.                 /* -18- */
  418.                 $options['top']['typography']['main_nav']['letter-spacing'],
  419.                 /* -19- */
  420.                 $options['top']['typography']['main_nav']['text-transform'],
  421.                 /* -20- */
  422.                 $fonts_helper->generate_inline_css_font_family( $options['top']['typography']['sub_nav']['font-family'], 'sans-serif' ),
  423.                 /* -21- */
  424.                 $options['top']['typography']['sub_nav']['font-size'],
  425.                 /* -22- */
  426.                 $options['top']['typography']['sub_nav']['font-style'],
  427.                 /* -23- */
  428.                 $options['top']['typography']['sub_nav']['font-weight'],
  429.                 /* -24- */
  430.                 $options['top']['typography']['sub_nav']['letter-spacing'],
  431.                 /* -25- */
  432.                 $options['top']['typography']['sub_nav']['text-transform'],
  433.                 /* -26- */
  434.                 $fonts_helper->generate_inline_css_font_family( $options['bottom']['typography']['main_nav']['font-family'], 'sans-serif' ),
  435.                 /* -27- */
  436.                 $options['bottom']['typography']['main_nav']['font-size'],
  437.                 /* -28- */
  438.                 $options['bottom']['typography']['main_nav']['font-style'],
  439.                 /* -29- */
  440.                 $options['bottom']['typography']['main_nav']['font-weight'],
  441.                 /* -30- */
  442.                 $options['bottom']['typography']['main_nav']['letter-spacing'],
  443.                 /* -31- */
  444.                 $options['bottom']['typography']['main_nav']['text-transform'],
  445.                 /* -32- */
  446.                 $fonts_helper->generate_inline_css_font_family( $options['bottom']['typography']['sub_nav']['font-family'], 'sans-serif' ),
  447.                 /* -33- */
  448.                 $options['bottom']['typography']['sub_nav']['font-size'],
  449.                 /* -34- */
  450.                 $options['bottom']['typography']['sub_nav']['font-style'],
  451.                 /* -35- */
  452.                 $options['bottom']['typography']['sub_nav']['font-weight'],
  453.                 /* -36- */
  454.                 $options['bottom']['typography']['sub_nav']['letter-spacing'],
  455.                 /* -37- */
  456.                 $options['bottom']['typography']['sub_nav']['text-transform'],
  457.                 /* -38- */
  458.                 $options['top']['gr_clr'],
  459.                 /* -39- */
  460.                 $options['bottom']['gr_clr'],
  461.                 /* -40- */
  462.                 $options['mobile']['header_gr_clr'],
  463.                 /* -41- */
  464.                 $options['logo']['margin_top'],
  465.                 /* -42- */
  466.                 $options['logo']['margin_bottom'],
  467.                 /* -43- */
  468.                 $options['mobile']['logo']['margin_top'],
  469.                 /* -44- */
  470.                 $options['mobile']['logo']['margin_bottom']
  471.             )
  472.         );
  473.     }
  474.  
  475.  
  476.     /**
  477.      * Enqueue front-end CSS for footer styles
  478.      *
  479.      * @see wp_add_inline_style()
  480.      */
  481.     public function footer_style_css() {
  482.  
  483.         $css = '
  484.         /* Custom Footer Styles */
  485.    
  486.         /* -top */
  487.         .footer {
  488.           background-color: %1$s;
  489.         }
  490.    
  491.         .footer .footer-top svg {
  492.           fill: %1$s;
  493.         }
  494.    
  495.         .footer .footer-bottom svg {
  496.           fill: %5$s;
  497.         }
  498.    
  499.         /* -primary color */
  500.         /* --primary bg */
  501.         #footer .cat-item.current-cat a,
  502.         #footer .widget_mc4wp_form_widget:before,#footer .widget_create_post:before,
  503.         #footer .cat-item a:hover,
  504.         #footer button[type="submit"],
  505.         #footer input[type="submit"],
  506.         #footer .bb-btn, #footer .bnt.primary {
  507.           background-color: %8$s;
  508.         }
  509.    
  510.         /* --primary text */
  511.         #footer .widget_mc4wp_form_widget:before,#footer .widget_create_post:before,
  512.         #footer button[type="submit"],
  513.         #footer input[type="submit"],
  514.         #footer .bb-btn, #footer .bb-bnt-primary {
  515.           color: %9$s;
  516.         }
  517.    
  518.         /* --primary hover */
  519.         #footer a:hover {
  520.           color: %8$s;
  521.         }
  522.    
  523.         #footer .widget_categories ul li a:hover,
  524.         #footer .widget_archive ul li a:hover,
  525.         #footer .widget_pages ul li a:hover,
  526.         #footer .widget_meta ul li a:hover,
  527.         #footer .widget_nav_menu ul li a:hover {
  528.           background-color: %8$s;
  529.           color: %9$s;
  530.         }
  531.    
  532.         #footer .slick-dots li.slick-active button:before,
  533.         #footer .widget_tag_cloud a:hover {
  534.           border-color:%8$s;
  535.         }
  536.    
  537.         /* -heading color */
  538.         #footer .bb-featured-strip .item .title,
  539.         #footer .slick-dots li button:before,
  540.         #footer h1,#footer h2,#footer h3,#footer h4, #footer h5,#footer h6,
  541.         #footer .widget-title {
  542.           color: %2$s;
  543.         }
  544.    
  545.         /* -text color */
  546.         #footer,
  547.         #footer .widget_recent_comments .recentcomments .comment-author-link,
  548.         #footer .widget_recent_comments .recentcomments a,
  549.         #footer .byline, #footer .posted-on,
  550.         #footer .widget_nav_menu ul li,
  551.         #footer .widget_categories ul li,
  552.         #footer .widget_archive ul li,
  553.         #footer .widget_pages ul li,
  554.         #footer .widget_meta ul li {
  555.           color: %3$s;
  556.         }
  557.         #footer .widget_tag_cloud  a, #footer select, #footer textarea, #footer input[type="tel"], #footer input[type="text"], #footer input[type="number"], #footer input[type="date"], #footer input[type="time"], #footer input[type="url"], #footer input[type="email"], #footer input[type="search"],#footer input[type="password"],
  558.         #footer .widget_mc4wp_form_widget:after, #footer .widget_create_post:after {
  559.             border-color: %3$s;
  560.         }
  561.    
  562.         #footer .widget_categories ul li a,
  563.         #footer .widget_archive ul li a,
  564.         #footer .widget_pages ul li a,
  565.         #footer .widget_meta ul li a,
  566.         #footer .widget_nav_menu ul li a,
  567.         #footer .widget_tag_cloud a {
  568.           color: %4$s;
  569.         }
  570.    
  571.         /* -bottom */
  572.         /* --text  color */
  573.         #footer .footer-bottom {
  574.           background-color: %5$s;
  575.           color: %6$s;
  576.         }
  577.    
  578.         /* --text  hover */
  579.         #footer .footer-bottom a:hover {
  580.           color: %7$s;
  581.         }';
  582.  
  583.         $set = get_theme_options_set( array(
  584.             'footer_design_top_background_color',
  585.             'footer_design_top_heading_color',
  586.             'footer_design_top_text_color',
  587.             'footer_design_top_link_color',
  588.             'footer_design_bottom_background_color',
  589.             'footer_design_bottom_text_color',
  590.             'footer_design_bottom_text_hover_color',
  591.             'footer_design_top_primary_color',
  592.             'footer_design_top_primary_text_color'
  593.         ) );
  594.  
  595.         wp_add_inline_style( 'primary-style',
  596.             sprintf(
  597.                 $css,
  598.                 $set['footer_design_top_background_color'],         /* -1- */
  599.                 $set['footer_design_top_heading_color'],            /* -2- */
  600.                 $set['footer_design_top_text_color'],               /* -3- */
  601.                 $set['footer_design_top_link_color'],               /* -4- */
  602.                 $set['footer_design_bottom_background_color'],      /* -5- */
  603.                 $set['footer_design_bottom_text_color'],            /* -6- */
  604.                 $set['footer_design_bottom_text_hover_color'],      /* -7- */
  605.                 $set['footer_design_top_primary_color'],            /* -8- */
  606.                 $set['footer_design_top_primary_text_color']        /* -9- */
  607.             )
  608.         );
  609.     }
  610.  
  611.  
  612.  
  613.     /**
  614.      * Enqueue front-end CSS for global styles
  615.      *
  616.      * @see wp_add_inline_style()
  617.      */
  618.     function global_style_css() {
  619.  
  620.         /**
  621.          * @var $title_template_helper Title_Template_Helper Title template helper
  622.          */
  623.         $title_template_helper = Template::init( 'title' );
  624.         $title_template_options = $title_template_helper->get_options();
  625.         $set = get_theme_options_set( array(
  626.             'design_primary_font_family',
  627.             'design_secondary_font_family',
  628.             'design_background_style',
  629.             'design_body_background_color',
  630.             'design_content_background_color',
  631.             'design_primary_color',
  632.             'design_primary_text_color',
  633.             'design_base_text_color',
  634.             'design_secondary_text_color',
  635.             'design_heading_text_color',
  636.             'design_border_radius',
  637.             'design_inputs_buttons_border_radius',
  638.             'design_border_color',
  639.             'design_secondary_components_background_color',
  640.             'design_social_icons_border_radius',
  641.             'design_post_titles_font_family',
  642.             'design_logo_font_family',
  643.             'design_general_text_font_size',
  644.             'design_single_post_heading_font_size',
  645.             'design_widget_heading_font_size',
  646.             'design_link_text_color',
  647.             'design_global_custom_css',
  648.             'design_secondary_components_text_color',
  649.             'design_body_background_image_type',
  650.             'extra_additional_enable_back_to_top_btn'
  651.         ) );
  652.  
  653.         switch( $set['design_body_background_image_type'] ) {
  654.             case 'cover':
  655.                 $set['design_body_background_image_css'] = 'background-size:cover;';
  656.                 break;
  657.             case 'repeat':
  658.                 $set['design_body_background_image_css'] = 'background-repeat:repeat;';
  659.                 break;
  660.             default:
  661.                 $set['design_body_background_image_css'] = '';
  662.         }
  663.  
  664.         switch( $set['design_background_style'] ) {
  665.             case 'boxed':
  666.                 $set['design_background_style'] = '1200px';
  667.                 break;
  668.             case 'full_width':
  669.                 $set['design_background_style'] = '100%';
  670.                 break;
  671.             default:
  672.                 $set['design_background_style'] = '100%';
  673.         }
  674.  
  675.         $set['design_border_radius'] = absint( $set['design_border_radius'] ) . 'px';
  676.         $set['design_inputs_buttons_border_radius'] = absint( $set['design_inputs_buttons_border_radius'] ) . 'px';
  677.         $set['design_social_icons_border_radius'] = absint( $set['design_social_icons_border_radius'] ) . 'px';
  678.         $screen_mb_boxed = '701px';
  679.  
  680.         $css = '/* - Page header - */';
  681.  
  682.         /***** Title Area Text Color ******/
  683.         if ( $title_template_options['text_color'] ) {
  684.             $css .= "
  685.                .bb-page-header .page-title, .bb-page-header .col .page-subtitle,.bb-page-header .cat-dropdown .dropdown-toggle {
  686.                   color: {$title_template_options['text_color']};
  687.                }";
  688.         }
  689.  
  690.         /***** Back To Top Button ******/
  691.         if( ! $set['extra_additional_enable_back_to_top_btn'] ) {
  692.             $css .= "
  693.                 /* Back To Top Button */           
  694.                 #go-top{
  695.                     display: none !important;
  696.                 }";
  697.         }
  698.  
  699.         if( ! empty( $title_template_options['background'] ) ) {
  700.  
  701.             /***** Background Color */
  702.             if ( in_array( 'color', $title_template_options[ 'background' ][ 'features' ] ) ) {
  703.                 $css .= "
  704.                     /* Bg color */
  705.                    .bb-page-header.has-bg-clr .container-bg {
  706.                       background-color: {$title_template_options['background']['color']};
  707.                    }";
  708.             }
  709.  
  710.             /***** Background Image */
  711.             if ( in_array( 'image', $title_template_options[ 'background' ][ 'features' ] ) ) {
  712.                 $css .= "
  713.                     /* Bg image */
  714.                    .bb-page-header.has-bg-img .container-bg {
  715.                       background-image: url({$title_template_options['background']['url']});
  716.                    }";
  717.             }
  718.             /***** Background Gradient */
  719.             else if ( in_array( 'gradient', $title_template_options[ 'background' ][ 'features' ] ) ) {
  720.                 $css .= sprintf( '
  721.                     /* Bg gradient */
  722.                     .bb-page-header.bg-gradient-bottom .container-bg {
  723.                         background: -webkit-gradient(linear, left top, left bottom, color-stop(0%%,%1$s), color-stop(100%%,%2$s));
  724.                         background: -webkit-linear-gradient(to bottom,%1$s,%2$s);
  725.                         background: -ms-linear-gradient(to bottom,%1$s,%2$s);
  726.                         background: linear-gradient(to bottom,%1$s,%2$s);
  727.                     }
  728.                     .bb-page-header.bg-gradient-top .container-bg {
  729.                         background: -webkit-gradient(linear, left top, left bottom, color-stop(0%%,%1$s), color-stop(100%%,%2$s));
  730.                         background: -webkit-linear-gradient(to top,%1$s,%2$s);
  731.                         background: -ms-linear-gradient(to top,%1$s,%2$s);
  732.                         background: linear-gradient(to top,%1$s,%2$s);
  733.                     }
  734.                     .bb-page-header.bg-gradient-right .container-bg {
  735.                         background: -webkit-gradient(linear, left top, right top, color-stop(0%%,%1$s), color-stop(100%%,%2$s));
  736.                         background: -webkit-linear-gradient(to right,%1$s,%2$s);
  737.                         background: -ms-linear-gradient(to right,%1$s,%2$s);
  738.                         background: linear-gradient(to right,%1$s,%2$s);
  739.                     }
  740.                     .bb-page-header.bg-gradient-left .container-bg {
  741.                         background: -webkit-gradient(linear, left top, right top, color-stop(0%%,%1$s), color-stop(100%%,%2$s));
  742.                         background: -webkit-linear-gradient(to left,%1$s,%2$s);
  743.                         background: -ms-linear-gradient(to left,%1$s,%2$s);
  744.                         background: linear-gradient(to left,%1$s,%2$s);
  745.                     }', $title_template_options[ 'background' ][ 'start' ], $title_template_options[ 'background' ][ 'end' ] );
  746.             }
  747.         }
  748.  
  749.         $css .= '
  750.  
  751.     /* -body bg color */
  752.     body,.bb-post-gallery-content .bb-gl-header {
  753.         background-color: %4$s;
  754.     }
  755.     .bb-cards-view .bb-post-single.style5 .site-main, .bb-cards-view .bb-post-single.style6 .container-inner {
  756.         background-color: %4$s;
  757.     }
  758.    
  759.     .branding .site-title {
  760.         %17$s
  761.         font-weight:%24$s;
  762.         font-style:%25$s;
  763.     }
  764.  
  765.     #background-image {
  766.         %23$s
  767.     }
  768.  
  769.     /* -Font sizes */
  770.     .widget-title {
  771.         font-size: %20$dpx;
  772.     }
  773.     body {
  774.         font-size: %18$dpx;
  775.     }
  776.     @media screen and (min-width: 992px) {
  777.         html {
  778.             font-size: %18$dpx;
  779.         }
  780.         .bb-post-single .s-post-title {
  781.             font-size: %19$dpx;
  782.         }
  783.     }
  784.  
  785.     /* -content bg color */
  786.     .page-wrapper,
  787.     #main,
  788.     .bb-cards-view .bb-card-item,
  789.     .bb-cards-view .widget_mc4wp_form_widget:after,
  790.     .bb-cards-view .widget_create_post:after,
  791.     .light-modal .modal-body,.light-modal,
  792.     .bb-toggle .bb-header-dropdown.toggle-content,
  793.     .bb-header.header-desktop .main-navigation .sub-menu,
  794.     .bb-post-share-box .post-share-count,
  795.     .bb-post-rating a,.comment-respond input[type=text], .comment-respond textarea, .comment-respond #commentform textarea#comment,
  796.     .bb-fixed-pagination .page,.bb-fixed-pagination .pg-content,
  797.     .bb-floating-navbar .floating-navbar-inner,
  798.     .bb-featured-strip .bb-arrow-next, .bb-featured-strip .bb-arrow-prev,
  799.     .bb-mobile-navigation,
  800.     .mejs-container,.bb-post-gallery-content,
  801.     .bb-dropdown .dropdown-toggle, .bb-dropdown .dropdown-content,
  802.     .bb-stretched-view .bb-post-single.style5 .site-main, .bb-stretched-view .bb-post-single.style6 .container-inner,
  803.     .bb-boxed-view .bb-post-single.style5 .site-main, .bb-boxed-view .bb-post-single.style6 .container-inner,
  804.     .bb-advertisement.bb-sticky-bottom-area .bb-sticky-btm-el {
  805.       background-color: %5$s;
  806.       border-color: %5$s;
  807.     }
  808.     /* Temp Color: will be option in future */
  809.     .bb-header.header-mobile.g-style .header-c {
  810.         background: %5$s;
  811.     }
  812.     .bb-header-navigation .main-navigation .sub-menu:before,
  813.     .bb-toggle .toggle-content.bb-header-dropdown:before {
  814.         border-color: transparent transparent %5$s;
  815.     }
  816.     select, .bb-form-block input, .bb-form-block select, .bb-form-block textarea,
  817.     .bb-author-vcard .author {
  818.         background-color: %5$s;
  819.     }
  820.     .bb-tabs .tabs-menu .count {
  821.       color: %5$s;
  822.     }
  823.  
  824.     /* -page width */
  825.     .page-wrapper {
  826.       width: %3$s;
  827.     }
  828.  
  829.     /* -primary color */
  830.     /* --primary color for bg */
  831.     .mark, mark,.box_list,
  832.     .bb-tooltip:before,
  833.     .bb-text-highlight.primary-color,
  834.     #comments .nav-links a,
  835.     .light-modal .modal-close,
  836.     .quiz_row:hover,
  837.     .progress-bar-success,
  838.     .onoffswitch,.onoffswitch2,
  839.     .widget_nav_menu ul li a:hover,
  840.     .widget_categories ul li a:hover,
  841.     .widget_archive ul li a:hover,
  842.     .widget_pages ul li a:hover,
  843.     .widget_meta ul li a:hover,
  844.     .widget_mc4wp_form_widget:before,.widget_create_post:before,
  845.     .widget_calendar table th a,
  846.     .widget_calendar table td a,
  847.     .go-top, .bb-affiliate-content .item-url,
  848.     .bb-mobile-navigation .close,
  849.     .bb-wp-pagination .page-numbers.next, .bb-wp-pagination .page-numbers.prev,
  850.     .navigation.pagination .page-numbers.next, .navigation.pagination .page-numbers.prev,
  851.     .bb-next-prev-pagination .page-link,
  852.     .bb-next-pagination .page-link,
  853.     .bb-post-share-box .post-share-count,
  854.     .cat-item.current-cat a,
  855.     .cat-item a:hover,
  856.     .bb-fixed-pagination .page:hover .pg-arrow,
  857.     button[type="submit"],
  858.     input[type="submit"],
  859.     .bb-btn.bb-btn-primary,.bb-btn.bb-btn-primary:hover,
  860.     blockquote:before,.bb-btn.bb-btn-primary-outline:hover,.bb-post-gallery-content .bb-gl-meta .bb-gl-arrow,
  861.     hr.primary-color,
  862.     .bb-bg-primary, .bb-bg-primary.bb-btn,
  863.     .bb-sticky-btm .btn-close {
  864.       background-color: %6$s;
  865.     }
  866.     .bb-tooltip:after,
  867.     hr.bb-line-dashed.primary-color, hr.bb-line-dotted.primary-color {
  868.         border-top-color:%6$s;
  869.     }
  870.  
  871.     /* --primary text */
  872.     .mark, mark,
  873.     .bb-tooltip:before,
  874.     .bb-wp-pagination .page-numbers.next, .bb-wp-pagination .page-numbers.prev,
  875.     .navigation.pagination .page-numbers.next, .navigation.pagination .page-numbers.prev,
  876.     .bb-text-highlight.primary-color,
  877.     #comments .nav-links a,
  878.     .light-modal .modal-close,
  879.     .sr-only,.box_list,
  880.     .quiz_row:hover, .bb-affiliate-content .item-url,
  881.     .onoffswitch,.onoffswitch2,
  882.     .bb-next-prev-pagination .page-link,
  883.     .bb-next-pagination .page-link,
  884.     .widget_nav_menu ul li a:hover,
  885.     .widget_categories ul li a:hover,
  886.     .widget_archive ul li a:hover,
  887.     .widget_pages ul li a:hover,
  888.     .widget_meta ul li a:hover,
  889.     .cat-item.current-cat a,
  890.     .widget_mc4wp_form_widget:before,.widget_create_post:before,
  891.     .go-top,
  892.     .widget_calendar table th a,
  893.     .widget_calendar table td a,
  894.     .bb-mobile-navigation .close,
  895.     .bb-post-share-box .post-share-count,
  896.     .bb-fixed-pagination .page:hover .pg-arrow,
  897.     button[type="submit"],
  898.     input[type="submit"],
  899.     .bb-btn.bb-btn-primary,.bb-btn.bb-btn-primary:hover,.bb-btn.bb-btn-primary-outline:hover,
  900.     blockquote:before,.bb-post-gallery-content .bb-gl-meta .bb-gl-arrow,
  901.     .bb-bg-primary,
  902.     .bb-sticky-btm .btn-close {
  903.       color: %7$s;
  904.     }
  905.  
  906.     /* -primary color */
  907.     /* --primary color for text */
  908.     #cancel-comment-reply-link,
  909.     .bb-affiliate-content .price:before,
  910.     .bb-header-navigation .main-navigation > ul .sub-menu li:hover > a,
  911.     .bb-header-navigation .main-navigation > ul .sub-menu li.current-menu-item a,
  912.     .bb-header-navigation .more-navigation .section-navigation ul li:hover a,
  913.     .bb-mobile-navigation .main-navigation li a:hover,.bb-mobile-navigation .main-navigation>ul>li .sub-menu li a:hover,
  914.     .bb-mobile-navigation .main-navigation li.current-menu-item > a, .bb-mobile-navigation .main-navigation .sub-menu li.current-menu-item > a,
  915.     .bb-mobile-navigation .main-navigation li.current-menu-item > .dropdown-toggle, .bb-mobile-navigation .main-navigation .sub-menu li.current-menu-item > .dropdown-toggle,
  916.     .single.nsfw-post .bb-post-single .nsfw-post h3,
  917.     .sticky .post-thumbnail:after,
  918.     .entry-no-lg,
  919.     .entry-title:hover a,
  920.     .post-types .item:hover .bb-icon,
  921.     .bb-text-dropcap.primary-color,
  922.     .bb-btn-primary-outline,
  923.     .bb-btn-link:hover,
  924.     .bb-btn-link,#comments .bypostauthor > .comment-body .vcard .fn,
  925.     .more-link:hover,
  926.     .widget_bb-side-navigation .menu-item.menu-item-icon .bb-icon,
  927.     .bb-post-nav .nsfw-post h3,
  928.     .post-thumbnail .nsfw-post h3,
  929.     .bb-price-block .current-price:before, .bb-price-block ins:before, .bb-price-block .amount:before, .product_list_widget ins .amount:before {
  930.       color: %6$s;
  931.     }
  932.  
  933.     .post-types .item:hover,
  934.     .more-load-button button:hover,
  935.     .bb-btn-primary-outline,.bb-btn-primary:hover,
  936.     .widget_tag_cloud .tagcloud a:hover {
  937.       border-color: %6$s;
  938.     }
  939.  
  940.     .bb-tabs .tabs-menu li.active:before  {
  941.         background-color: %6$s;
  942.     }
  943.  
  944.     /* -link color */
  945.     a,.bb-timing-block .timing-seconds {
  946.       color:%21$s
  947.     }
  948.  
  949.     /* - base text color */
  950.     body, html,
  951.     .widget_recent_comments .recentcomments .comment-author-link,.widget_recent_comments .recentcomments a,
  952.     .bb-header.header-desktop .main-navigation .sub-menu,
  953.     .bb-header-dropdown.toggle-content,.comment-respond input[type=text], .comment-respond textarea,
  954.     .featured-strip .slick-dots li button:before,
  955.     .more-load-button button,.comment-vote .count,
  956.     .bb-mobile-navigation .bb-header-search .search-submit,
  957.     #comments .comment .comment-body .comment-content small .dropdown-toggle,
  958.     .byline a,.byline .author-name,
  959.     .bb-featured-strip .bb-arrow-next, .bb-featured-strip .bb-arrow-prev,
  960.     .bb-price-block, .bb-price-block > .amount, .bb-price-block ins .amount,
  961.     .bb-dropdown .dropdown-content a,
  962.     .bb-author-vcard .auth-references a,
  963.     .light-modal,
  964.    .bb-author-vcard-mini .auth-url,
  965.     .bb-post-gallery-content .bb-gl-meta .bb-gl-pagination b,
  966.      .bb-post-gallery-content.bb-mode-slide .bb-mode-switcher[data-mode=slide],
  967.      .bb-post-gallery-content.bb-mode-grid .bb-mode-switcher[data-mode=grid]{
  968.       color: %8$s;
  969.     }
  970.  
  971.     /* --heading text color */
  972.     #comments .vcard .fn,
  973.     .bb-fixed-pagination .page .pg-title,
  974.     .more_items_x legend, .more_items legend, .more_items_glow,
  975.     h1, h2, h3, h4, h5, h6 {
  976.       color: %10$s;
  977.     }
  978.     .bb-tabs .tabs-menu li.active, .bb-tabs .tabs-menu li.active {
  979.       border-color: %10$s;
  980.     }
  981.     .bb-tabs .tabs-menu .count {
  982.       background-color: %10$s;
  983.     }
  984.  
  985.     /* --secondary text color */
  986.     s, strike, del,label,#comments .pingback .comment-body .comment-content, #comments .comment .comment-body .comment-content,
  987.     #TB_ajaxWindowTitle,
  988.     .bb-affiliate-content .price .old-price,
  989.     .bb-header-navigation .more-navigation .sections-header,
  990.     .bb-mobile-navigation .more-menu .more-menu-body .sections-header,
  991.     .bb-post-share-box .bb-post-rating .count .text:after,
  992.     .inline-popup .intro,.comment-vote a .bb-icon,
  993.     .authentication .intro,.widget_recent_comments .recentcomments,
  994.     .post-types .item .bb-icon,
  995.     .bb-post-rating a,.post-thumbnail .thumbnail-caption,
  996.     table thead th, table tfoot th, .bb-post-share-box .mobile-info,
  997.     .widget_create_post .text,
  998.     .widget_footer .text,
  999.     .bb-author-vcard .author-info,.bb-author-vcard .auth-byline,
  1000.     .wp-caption .wp-caption-text, .wp-caption-dd,
  1001.     #comments .comments-title span,
  1002.     #comments .comment-notes,
  1003.     #comments .comment-metadata,
  1004.     .short-info .create-post .text,
  1005.     .bb-cat-links,
  1006.     .widget_bb-side-navigation .menu-item.menu-item-has-children .dropdown-toggle,
  1007.     .bb-post-meta .post-comments,.entry-sub-title,
  1008.     .bb-page-header .page-subtitle,
  1009.     .widget_bb-side-navigation .bb-widget-title,
  1010.     .bb-price-block .old-price,.bb-price-block del .amount,
  1011.     .widget_recent_comments .recentcomments,
  1012.     .bb-post-gallery-content .bb-gl-mode-switcher,
  1013.    .bb-author-vcard-mini .auth-byline, .bb-author-vcard-mini .auth-posted-on, .bb-author-vcard-mini .auth-title,
  1014.     .s-post-meta .post-comments,
  1015.     .bb-sec-label,
  1016.     .bb-breadcrumb.clr-style1, .bb-breadcrumb.clr-style1 a {
  1017.       color: %9$s;
  1018.     }
  1019.  
  1020.     ::-webkit-input-placeholder {
  1021.       color: %9$s;
  1022.     }
  1023.  
  1024.     :-moz-placeholder {
  1025.       color: %9$s;
  1026.     }
  1027.  
  1028.     :-ms-input-placeholder {
  1029.       color: %9$s;
  1030.     }
  1031.  
  1032.     /* -font family */
  1033.     /* --base font family */
  1034.     body, html,
  1035.     #cancel-comment-reply-link,
  1036.     #comments .comments-title span {
  1037.       %1$s
  1038.     }
  1039.  
  1040.     /* --Post heading font family */
  1041.     .entry-title {
  1042.      %16$s
  1043.     }
  1044.  
  1045.     /* --secondary font family */
  1046.     .bb-wp-pagination,.navigation.pagination,
  1047.     .comments-area h3,[class*=" mashicon-"] .text, [class^=mashicon-] .text,
  1048.     .entry-no-lg,
  1049.     .bb-reaction-box .title, .bb-reaction-box .reaction-item .reaction-vote-btn,
  1050.     #comments .comments-title, #comments .comment-reply-title,
  1051.     .bb-page-header .bb-trending-navigation ul li a,
  1052.     .widget-title,
  1053.     .bb-badge .text,.post-number,
  1054.     .more_items_x legend, .more_items legend, .more_items_glow,
  1055.     section.error-404 .text,
  1056.     .inline-popup .title,
  1057.     .authentication .title,
  1058.     .bb-other-posts .title,
  1059.     .bb-post-share-box h2,
  1060.     .bb-page-header h1 {
  1061.       %2$s
  1062.     }
  1063.  
  1064.     /* -border-color */
  1065.     .bb-page-header .container-bg, .bb-page-header.boxed.has-bg .container-bg,
  1066.     .bb-header-navigation .main-navigation .sub-menu,
  1067.     .bb-header-navigation .more-navigation .more-menu-header,
  1068.     .bb-header-navigation .more-navigation .more-menu-footer,
  1069.     .bb-mobile-navigation .more-menu .bb-badge-list,
  1070.     .bb-mobile-navigation .main-navigation,
  1071.     .bb-mobile-navigation .more-menu-body,
  1072.     .spinner-pulse,
  1073.     .bb-border-thumb,#comments .pingback, #comments .comment,
  1074.     .more-load-button button,
  1075.     .bb-post-rating .count .bb-icon,
  1076.     .quiz_row,.bb-post-collection .post-items .post-item .post-author-meta, .post-grid .page .post-author-meta, .post-list .post .post-author-meta, .post-list .page .post-author-meta,.post-list.standard .post footer,
  1077.     .post-list.standard .entry-sub-title,
  1078.     .more-load-button:before,
  1079.     .bb-mobile-navigation .bb-header-search form,
  1080.     #TB_window .shares,
  1081.     .wp-playlist,.comments .tabs-content,
  1082.     .post-types .item,
  1083.     .bb-page-header .bb-trending-navigation,
  1084.     .widget_mc4wp_form_widget:after,.widget_create_post:after,
  1085.     .bb-post-rating .inner,
  1086.     .bb-post-rating .point-btn,
  1087.     .widget_bb-side-navigation .menu-item.menu-item-has-children>a,
  1088.     .bb-author-vcard .author, #comments .comment-list, #comments .pingback .children .comment, #comments .comment .children .comment,
  1089.     .widget_social,
  1090.     .widget_subscribe,.bb-post-nav .pg-item,
  1091.     .bb-post-nav .page,.bb-tags a,.tagcloud a,
  1092.     .bb-next-prev-pagination,
  1093.     .widget_tag_cloud .tagcloud a,
  1094.     select, textarea, input[type="tel"], input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="url"], input[type="email"], input[type="search"], input[type="password"],
  1095.     .bb-featured-menu:before,
  1096.     .select2-container--default .select2-selection--single, .select2-container--default .select2-search--dropdown .select2-search__field, .select2-dropdown,
  1097.     .bb-bordered-block:after,
  1098.     .bb-dropdown .dropdown-toggle, .bb-dropdown .dropdown-content, .bb-dropdown .dropdown-content li,.bb-post-gallery-content .bb-gl-mode-switcher,.bb-post-gallery-content .bb-gl-mode-switcher .bb-mode-switcher:first-child,
  1099.     .bb-tabs.tabs-horizontal .tabs-menu,.mixed-list .post-item-classic footer {
  1100.       border-color: %13$s;
  1101.     }
  1102.     hr, .bb-brand-block .brand-content:before {
  1103.       background-color: %13$s;
  1104.     }
  1105.  
  1106.     /* -secondary components bg color */
  1107.     .bb-fixed-pagination .page .pg-arrow,
  1108.     .captcha-container,.comment-respond form,
  1109.     .bb-post-share-box .post-meta,
  1110.     table tbody tr:nth-child(2n+1) th,
  1111.     table tbody tr:nth-child(2n+1) td,
  1112.     .bb-reaction-box .reaction-item .reaction-bar,
  1113.     .bb-reaction-box .reaction-item .reaction-vote-btn,
  1114.     .widget_bb-side-navigation .sub-menu .menu-item.menu-item-icon .bb-icon,
  1115.     #comments .pingback .comment-body .comment-reply-link, #comments .comment .comment-body .comment-reply-link,.bb-btn, button,
  1116.     .widget_sidebar_footer,
  1117.     .bb-form-block,
  1118.     .bb-author-vcard header,.bb-post-gallery-content .bb-gl-image-text,
  1119.     .bb-wp-pagination span.current, .bb-wp-pagination a.page-numbers:not(.next):not(.prev):hover,
  1120.     .navigation.pagination span.current, .navigation.pagination a.page-numbers:not(.next):not(.prev):hover,
  1121.     .bb-dropdown .dropdown-content li.active,
  1122.     .bb-post-gallery-content .bb-gl-image-text,
  1123.     .bb-media-placeholder:before,
  1124.     .bb-source-via .s-v-itm,
  1125.     .bb-tabs .tabs-content,.bb-reading-time {
  1126.         background-color: %14$s;
  1127.     }
  1128.  
  1129.     /* -secondary components text color */
  1130.     .bb-fixed-pagination .page .pg-arrow,.bb-post-share-box .post-meta,.captcha-container input,.form-captcha .refresh-captcha,#comments .pingback .comment-body .comment-reply-link, #comments .comment .comment-body .comment-reply-link,.bb-reaction-box .reaction-item .reaction-vote-btn,.bb-reaction-box .reaction-item .reaction-bar,.bb-btn,.comment-respond form,
  1131.     .bb-wp-pagination span.current, .bb-wp-pagination a.page-numbers:not(.next):not(.prev):hover,
  1132.     .navigation.pagination span.current, .navigation.pagination a.page-numbers:not(.next):not(.prev):hover,
  1133.     .widget_bb-side-navigation .sub-menu .menu-item.menu-item-icon .bb-icon,
  1134.     .widget_sidebar_footer,
  1135.     .bb-author-vcard .header-info a,.bb-author-vcard .auth-name,
  1136.     .bb-dropdown .dropdown-content li.active,
  1137.     .bb-source-via .s-v-link,.bb-reading-time {
  1138.         color:%22$s;
  1139.     }
  1140.     .captcha-container input {border-color:%22$s}
  1141.  
  1142.     /* -border-radius */
  1143.     img,video,.comment-respond form,
  1144.     .captcha-container,
  1145.     .bb-media-placeholder,
  1146.     .bb-cards-view .bb-card-item,
  1147.     .post-thumbnail .video-wrapper,
  1148.     .post-thumbnail .view-full-post,
  1149.     .bb-post-share-box .post-meta,
  1150.     .hy_plyr canvas,.bb-featured-strip .item .media,
  1151.     .quiz_row,.box_list,
  1152.     .bb-border-thumb,
  1153.     .advertisement .massage,
  1154.     [class^="mashicon-"],
  1155.     #TB_window,
  1156.     #score_modal .shares a div, #TB_window .shares a div,
  1157.     .bb-mobile-navigation .close,
  1158.     .onoffswitch-label,
  1159.     .light-modal .modal-close,
  1160.     .onoffswitch2-label,
  1161.     .post-types .item,
  1162.     .onoffswitch,.onoffswitch2,
  1163.     .bb-page-header .bb-trending-navigation ul li.active a,
  1164.     .widget_mc4wp_form_widget:after,.widget_create_post:after,
  1165.     .bb-author-vcard .author,
  1166.     .widget_sidebar_footer,
  1167.     .short-info,
  1168.     .inline-popup,
  1169.     .bb-reaction-box .reaction-item .reaction-bar,
  1170.     .bb-reaction-box .reaction-item .reaction-vote-btn,
  1171.     .bb-post-share-box .post-share-count,
  1172.     .post-thumbnail,
  1173.     .share-button,
  1174.     .bb-post-rating .inner,
  1175.     .bb-page-header.boxed.has-bg .container-bg,
  1176.     .widget_subscribe,
  1177.     .widget_social,
  1178.     .sub-menu,
  1179.     .fancybox-skin,
  1180.     .widget_tag_cloud .tagcloud a,
  1181.     .bb-tags a,.tagcloud a, .bb-header-dropdown.toggle-content,
  1182.     .authentication .button, #respond .button, .wp-social-login-provider-list .button,
  1183.     .bb-bordered-block:after,
  1184.     .wpml-ls-legacy-dropdown, .wpml-ls-legacy-dropdown a.wpml-ls-item-toggle, .wpml-ls-legacy-dropdown-click, .wpml-ls-legacy-dropdown-click a.wpml-ls-item-toggle,
  1185.     .wpml-ls-legacy-dropdown .wpml-ls-sub-menu, .wpml-ls-legacy-dropdown-click .wpml-ls-sub-menu,
  1186.     .nsfw-post,
  1187.     .light-modal .modal-body,
  1188.     .bb-featured-area .featured-media, .bb-featured-area .featured-item,
  1189.     .s-post-featured-media.boxed .featured-media-el,
  1190.     .bb-source-via .s-v-itm,
  1191.     .bb-tabs .tabs-content,
  1192.     .bb-sticky-btm .btn-close {
  1193.       -webkit-border-radius: %11$s;
  1194.          -moz-border-radius: %11$s;
  1195.               border-radius: %11$s;
  1196.     }
  1197.     .bb-featured-area .featured-header {
  1198.      border-bottom-left-radius: %11$s;
  1199.      border-bottom-right-radius: %11$s;
  1200.    }
  1201.  
  1202.     /* --border-radius for inputs, buttons */
  1203.     .form-captcha img,.go-top,
  1204.     .bb-next-prev-pagination .page-link,
  1205.     .bb-next-pagination .page-link,
  1206.     .bb-wp-pagination a,.bb-wp-pagination span,
  1207.     .navigation.pagination a,.navigation.pagination span,
  1208.     .bb-affiliate-content .affiliate-link,
  1209.     .bb-btn, input, select, .select2-container--default .select2-selection--single, textarea, button, .bb-btn, #comments  li .comment-body .comment-reply-link, .bb-header.header-desktop  .create-post,
  1210.     .bb-affiliate-content .item-url,
  1211.     .bb-btn, input, select, textarea, button, .bb-btn, #comments  li .comment-body .comment-reply-link {
  1212.       -webkit-border-radius: %12$s;
  1213.       -moz-border-radius: %12$s;
  1214.       border-radius: %12$s;
  1215.     }
  1216.  
  1217.     /* --border-radius social icons */
  1218.     .social.circle ul li a {
  1219.         -webkit-border-radius: %15$s;
  1220.         -moz-border-radius: %15$s;
  1221.         border-radius: %15$s;
  1222.     }
  1223.    
  1224.     /* --Featured Menu options */
  1225.     .bb-featured-menu a {
  1226.         background-color: %26$s;
  1227.         color: %27$s;
  1228.        
  1229.         -webkit-border-radius: %28$dpx;
  1230.       -moz-border-radius: %28$dpx;
  1231.       border-radius: %28$dpx;
  1232.     }
  1233. ';
  1234.  
  1235.         $css = apply_filters( 'theme/color_scheme_styles', $css );
  1236.         $fonts_helper = Fonts_Helper::get_instance();
  1237.         $featured_labels_design = Template::init( 'featured-labels' )->get_designs_options();
  1238.  
  1239.         wp_add_inline_style( 'primary-style',
  1240.             sprintf(
  1241.                 $css,
  1242.                 /* -1- */
  1243.                 $fonts_helper->generate_inline_css_font_family( $set['design_primary_font_family']['font-family'], 'sans-serif' ),
  1244.                 /* -2- */
  1245.                 $fonts_helper->generate_inline_css_font_family( $set['design_secondary_font_family']['font-family'], 'sans-serif' ),
  1246.                 /* -3- */
  1247.                 $set['design_background_style'],
  1248.                 /* -4- */
  1249.                 $set['design_body_background_color'],
  1250.                 /* -5- */
  1251.                 $set['design_content_background_color'],
  1252.                 /* -6- */
  1253.                 $set['design_primary_color'],
  1254.                 /* -7- */
  1255.                 $set['design_primary_text_color'],
  1256.                 /* -8- */
  1257.                 $set['design_base_text_color'],
  1258.                 /* -9- */
  1259.                 $set['design_secondary_text_color'],
  1260.                 /* -10- */
  1261.                 $set['design_heading_text_color'],
  1262.                 /* -11- */
  1263.                 $set['design_border_radius'],
  1264.                 /* -12- */
  1265.                 $set['design_inputs_buttons_border_radius'],
  1266.                 /* -13- */
  1267.                 $set['design_border_color'],
  1268.                 /* -14- */
  1269.                 $set['design_secondary_components_background_color'],
  1270.                 /* -15- */
  1271.                 $set['design_social_icons_border_radius'],
  1272.                 /* -16- */
  1273.                 $fonts_helper->generate_inline_css_font_family( $set['design_post_titles_font_family']['font-family'], 'sans-serif' ),
  1274.                 /* -17- */
  1275.                 $fonts_helper->generate_inline_css_font_family( $set['design_logo_font_family']['font-family'], 'sans-serif' ),
  1276.                 /* -18- */
  1277.                 $set['design_general_text_font_size'],
  1278.                 /* -19- */
  1279.                 $set['design_single_post_heading_font_size'],
  1280.                 /* -20- */
  1281.                 $set['design_widget_heading_font_size'],
  1282.                 /* -21- */
  1283.                 $set['design_link_text_color'],
  1284.                 /* -22- */
  1285.                 $set['design_secondary_components_text_color'],
  1286.                 /* -23- */
  1287.                 $set['design_body_background_image_css'],
  1288.                 /* -24- */
  1289.                 $set['design_logo_font_family']['font-weight'],
  1290.                 /* -25- */
  1291.                 $set['design_logo_font_family']['font-style'],
  1292.                 /* -26- */
  1293.                 $featured_labels_design['bg_clr'],
  1294.                 /* -27- */
  1295.                 $featured_labels_design['text_clr'],
  1296.                 /* -28- */
  1297.                 $featured_labels_design['border_radius']
  1298.             )
  1299.         );
  1300.     }
  1301.  
  1302.  
  1303.     /**
  1304.      * Enqueue front-end CSS for badges styles
  1305.      *
  1306.      * @see wp_add_inline_style()
  1307.      */
  1308.     public function badges_style_css() {
  1309.         $css = '
  1310.         /* Custom Header Styles */
  1311.    
  1312.         /* -badge bg color */
  1313.         .reaction-item .reaction-bar .reaction-stat,
  1314.         .bb-badge .circle {
  1315.           background-color: %1$s;
  1316.         }
  1317.    
  1318.         .reaction-item .reaction-vote-btn:not(.disabled):hover,
  1319.         .reaction-item.voted .reaction-vote-btn {
  1320.             background-color: %1$s !important;
  1321.         }
  1322.    
  1323.         /* -badge text color */
  1324.         .reaction-item .reaction-vote-btn:not(.disabled):hover,
  1325.         .reaction-item.voted .reaction-vote-btn,
  1326.         .bb-badge .text {
  1327.           color: %2$s;
  1328.         }
  1329.    
  1330.         /* -category/tag bg color */
  1331.         .bb-badge.category .circle,
  1332.         .bb-badge.post_tag .circle {
  1333.           background-color:  %6$s;
  1334.         }
  1335.    
  1336.         /* -category/tag text color */
  1337.         .bb-badge.category .text,
  1338.         .bb-badge.post_tag .text {
  1339.           color:  %8$s;
  1340.         }
  1341.    
  1342.         /* -category/tag icon color */
  1343.         .bb-badge.category .circle i,
  1344.         .bb-badge.post_tag .circle i {
  1345.           color:  %7$s;
  1346.         }
  1347.    
  1348.         /* --Trending */
  1349.         .bb-badge.trending .circle,
  1350.         .bb-page-header .bb-trending-navigation ul li.active a,
  1351.         .post-number {
  1352.           background-color: %3$s;
  1353.         }
  1354.    
  1355.         .widget-title .bb-icon,
  1356.         .bb-trending-navigation ul li a .bb-icon, .trending-post .bb-post-single .s-post-views {
  1357.           color: %3$s;
  1358.         }
  1359.    
  1360.         .bb-badge.trending .circle i,
  1361.         .bb-page-header .bb-trending-navigation ul li.active a,
  1362.         .bb-page-header .bb-trending-navigation ul li.active a .bb-icon,
  1363.         .post-number {
  1364.           color: %4$s;
  1365.         }
  1366.    
  1367.         .bb-badge.trending .text {
  1368.             color: %5$s;
  1369.         }
  1370.    
  1371.         %9$s
  1372.     ';
  1373.  
  1374.         $set = get_theme_options_set( array(
  1375.             'extras_badges_reactions_background_color',
  1376.             'extras_badges_reactions_text_color',
  1377.             'extras_badges_trending_background_color',
  1378.             'extras_badges_trending_icon_color',
  1379.             'extras_badges_trending_text_color',
  1380.             'extras_badges_category_background_color',
  1381.             'extras_badges_category_icon_color',
  1382.             'extras_badges_category_text_color'
  1383.         ) );
  1384.  
  1385.         wp_add_inline_style( 'primary-style',
  1386.             sprintf(
  1387.                 $css,
  1388.                 $set['extras_badges_reactions_background_color'],       /* -1- */
  1389.                 $set['extras_badges_reactions_text_color'],             /* -2- */
  1390.                 $set['extras_badges_trending_background_color'],        /* -3- */
  1391.                 $set['extras_badges_trending_icon_color'],              /* -4- */
  1392.                 $set['extras_badges_trending_text_color'],              /* -5- */
  1393.                 $set['extras_badges_category_background_color'],        /* -6- */
  1394.                 $set['extras_badges_category_icon_color'],              /* -7- */
  1395.                 $set['extras_badges_category_text_color'],              /* -8- */
  1396.                 $this->get_terms_personal_styles()                      /* -9- */
  1397.             )
  1398.         );
  1399.     }
  1400.  
  1401.     /**
  1402.      * Get terms personal styles
  1403.      * @return string
  1404.      */
  1405.     public function get_terms_personal_styles() {
  1406.         global $wpdb;
  1407.  
  1408.         $query = "SELECT `t`.`term_id`,`t`.`name`,`t`.`slug`,`tt`.`taxonomy`,`tm`.`meta_value` AS `color`
  1409.         FROM `" . $wpdb->terms . "` AS `t`
  1410.         LEFT JOIN `" . $wpdb->term_taxonomy . "` AS `tt` ON `tt`.`term_id` = `t`.`term_id`
  1411.         INNER JOIN `" . $wpdb->termmeta . "` AS `tm` ON `tm`.`term_id` = `t`.`term_id` AND `tm`.`meta_key` = %s";
  1412.  
  1413.         $query = $wpdb->prepare( apply_filters( 'theme/term_personal_styles_query', $query ),'term_icon_background_color' );
  1414.  
  1415.         $terms_color_data = $wpdb->get_results( $query );
  1416.         $css = '';
  1417.  
  1418.         $format = theme_is_amp() ? '.bb-badge-list .bb-badge.%1$s-%2$d { background-color: %3$s; }' : '.bb-badge.%1$s-%2$d .circle { background-color: %3$s; }';
  1419.         foreach( $terms_color_data as $term_color_data ) {
  1420.             $css .= sprintf(
  1421.                 $format,
  1422.                 $term_color_data->taxonomy,
  1423.                 $term_color_data->term_id,
  1424.                 $term_color_data->color
  1425.             );
  1426.         }
  1427.         return $css;
  1428.     }
  1429.  
  1430.     /**
  1431.      * Setup mobile bar color
  1432.      * @since 2.5.5
  1433.      * @version 2.5.5
  1434.      */
  1435.     public function set_mobile_address_bar_color() {
  1436.         if( ! wp_is_mobile() ) {
  1437.             return;
  1438.         }
  1439.  
  1440.         $address_bar__color = apply_filters( 'theme/mobile/address_bar_color', get_theme_option( 'mobile_header_address_bar_color' ) );
  1441.         if( ! $address_bar__color ) {
  1442.             return;
  1443.         }
  1444.  
  1445.         printf( '<meta name="theme-color" content="%s" />', $address_bar__color );
  1446.     }
  1447.  
  1448. }
  1449.  
  1450. Design_Scheme::get_instance();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement