403Webshell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.222
Web Server : Apache
System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : karinebmkh ( 644538)
PHP Version : 8.4.22
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/karinebmkh/www2/wp-content/themes/glaza/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/karinebmkh/www2/wp-content/themes/glaza/includes/dynamic_style.php
<?php
/**
 * @return string
 * dynamic CSS
 */
if ( ! function_exists( 'glaza_dynamic_style' ) ) {
	function glaza_dynamic_style() {

		$cache = get_option( 'glaza_style_cache' );
		if ( empty( $cache ) ) {
			$dynamic_css = '';

			$h1_size                = glaza_get_option( 'h1_size' );
			$h2_size                = glaza_get_option( 'h2_size' );
			$h3_size                = glaza_get_option( 'h3_size' );
			$h4_size                = glaza_get_option( 'h4_size' );
			$h5_size                = glaza_get_option( 'h5_size' );
			$h6_size                = glaza_get_option( 'h6_size' );
			$h_padding_top          = glaza_get_option( 'h_padding_top' );
			$h_padding_bottom       = glaza_get_option( 'h_padding_bottom' );
			$title_size_1           = glaza_get_option( 'font_post_title_size_1' );
			$title_size_2           = glaza_get_option( 'font_post_title_size_2' );
			$title_size_3           = glaza_get_option( 'font_post_title_size_3' );
			$title_size_4           = glaza_get_option( 'font_post_title_size_4' );
			$mobile_logo_size       = glaza_get_option( 'font_logo_mobile_size' );
			$post_excerpt_mobile    = glaza_get_option( 'post_excerpt_mobile' );
			$global_color           = glaza_get_option( 'global_color' );
			$font_button            = glaza_get_option( 'font_button' );
			$font_input             = glaza_get_option( 'font_input' );
			$font_header_widget     = glaza_get_option( 'font_header_widget' );
			$font_post_meta         = glaza_get_option( 'font_post_meta' );
			$font_header_block      = glaza_get_option( 'font_header_block' );
			$navbar_color_bg        = glaza_get_option( 'navbar_color_bg' );
			$navbar_color           = glaza_get_option( 'navbar_color' );
			$navbar_color_hover     = glaza_get_option( 'navbar_color_hover' );
			$navbar_color_bg_sub    = glaza_get_option( 'navbar_color_bg_sub' );
			$navbar_color_sub       = glaza_get_option( 'navbar_color_sub' );
			$navbar_color_hover_sub = glaza_get_option( 'navbar_color_hover_sub' );
			$font_breadcrumb        = glaza_get_option( 'font_breadcrumb' );
			$hyperlink_color        = glaza_get_option( 'hyperlink_color' );
			$widget_title_color     = glaza_get_option( 'widget_title_color' );
			$widget_border_color    = glaza_get_option( 'widget_border_color' );


			if ( ! empty( $h1_size ) && 42 != $h1_size ) {
				$dynamic_css .= 'h1 { font-size:' . absint( $h1_size ) . 'px;}';
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= 'body h1 { font-size:' . ceil( absint( $h1_size ) * 0.83 ) . 'px;}';
				$dynamic_css .= '}';

			}
			if ( ! empty( $h2_size ) && 32 != $h2_size ) {
				$dynamic_css .= 'h2 { font-size:' . absint( $h2_size ) . 'px;}';
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= 'body h2 { font-size:' . ceil( absint( $h2_size ) * 0.83 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $h3_size ) && 26 != $h3_size ) {
				$dynamic_css .= 'h3 { font-size:' . absint( $h3_size ) . 'px;}';
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= 'body h3 { font-size:' . ceil( absint( $h3_size ) * 0.83 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $h4_size ) && 22 != $h4_size ) {
				$dynamic_css .= 'h4 { font-size:' . absint( $h4_size ) . 'px;}';
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= 'body h4 { font-size:' . ceil( absint( $h4_size ) * 0.9 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $h5_size ) && 18 != $h5_size ) {
				$dynamic_css .= 'h5 { font-size:' . absint( $h5_size ) . 'px;}';
			}

			if ( ! empty( $h6_size ) && 15 != $h6_size ) {
				$dynamic_css .= 'h6 { font-size:' . absint( $h6_size ) . 'px;}';
			}

			if ( ! empty( $h_padding_top ) ) {
				$dynamic_css .= 'h1,h2,h3,h4,h5,h6 { padding-top:' . absint( $h_padding_top ) . 'px;}';
			}
			if ( ! empty( $h_padding_bottom ) ) {
				$dynamic_css .= 'h1,h2,h3,h4,h5,h6 { padding-bottom:' . absint( $h_padding_bottom ) . 'px;}';
			}


			if ( ! empty( $mobile_logo_size ) && 24 != $mobile_logo_size ) {
				$dynamic_css .= '.logo-mobile-wrap.is-logo-text .logo-text { font-size:' . absint( $mobile_logo_size ) . 'px;}';
			}

			if ( ! empty( $post_excerpt_mobile ) ) {
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= ' .post-excerpt { display: none; }';
				$dynamic_css .= '}';
			}


			if ( ! empty( $global_color ) && '#ff3174' != strtolower( $global_color ) ) {

				$dynamic_css .= '.off-canvas-wrap.is-light-text::-webkit-scrollbar-corner, .off-canvas-wrap.is-light-text::-webkit-scrollbar-thumb';
				$dynamic_css .= '{ background-color: ' . esc_attr( $global_color ) . ';}';

				$dynamic_css .= 'blockquote:before, .navbar-social a:hover, .navbar-social a:focus, .navbar-right .cart-icon:hover, ';
				$dynamic_css .= '.navbar-right .search-icon:hover, .navbar-right .cart-icon:focus, .navbar-right .search-icon:focus, ';
				$dynamic_css .= '.main-menu-inner > li > a:hover, .main-menu-inner > li > a:focus, .main-menu-inner > li.current_page_item > a, ';
				$dynamic_css .= ' .header-style-2 .main-menu-inner > li > a:hover, .header-style-2 .main-menu-inner > li > a:focus, .header-style-2 .main-menu-inner > li.current_page_item > a, ';
				$dynamic_css .= '.cat-item a:hover, .widget_archive a:hover, .widget_pages .page_item a:hover, ';
				$dynamic_css .= '.sidebar-wrap .widget_nav_menu .menu-item a:hover, .widget_meta a:hover, .twitter-content.post-excerpt a, ';
				$dynamic_css .= '.follower-el a:hover i, .follower-el a:focus i, .filter-link.is-active, .filter-link:not(.is-active):hover, ';
				$dynamic_css .= '.breadcrumb a:hover, .breadcrumb.woocommerce-breadcrumb a:hover, ';
				$dynamic_css .= '.single-action a:hover, .single-action a:focus, .single-left-share a:hover, .single-left-share a:focus, ';
				$dynamic_css .= '.single .single-entry a:not(button):hover, .single .single-entry a:not(button):focus, .comment-content a:hover, .comment-content a:focus, ';
				$dynamic_css .= '.single-post-author a:hover, .single-post-author a:focus, .logged-in-as a:hover, .comment-list .logged-in-as a:hover ';
				$dynamic_css .= '{ color: ' . esc_attr( $global_color ) . ';}';

				$dynamic_css .= 'blockquote:after, .block-title.is-link:hover, .block-title.is-link:focus, #wp-calendar #prev a:hover, #wp-calendar #next a:hover, ';
				$dynamic_css .= '.btn:hover, .btn:focus, .is-light-text .btn:hover, .is-light-text .btn:focus, a.comment-reply-link:hover, ';
				$dynamic_css .= '.navbar-subscribe a:hover, .navbar-subscribe a:focus ';
				$dynamic_css .= '{ border-color: ' . esc_attr( $global_color ) . ';}';

				$dynamic_css .= 'input[type="submit"]:hover, button:hover, .is-light-text input[type="submit"]:hover, .is-light-text button:hover, ';
				$dynamic_css .= '.pagination-wrap.pagination-loadmore a:hover, .pagination-wrap.pagination-loadmore a.loading, ';
				$dynamic_css .= '.pagination-nextprev a:hover, .pagination-nextprev a:focus, .pagination-number a.page-numbers:hover, ';
				$dynamic_css .= '.pagination-number a.page-numbers:focus, .slider-nav:hover, .navbar-subscribe a:hover, .navbar-subscribe a:focus, ';
				$dynamic_css .= '.navbar-right .cart-icon:hover .cart-counter, .navbar-right .cart-icon:focus .cart-counter, .main-menu-inner .sub-menu > li.menu-item > a:hover, .header-style-2 .cart-counter,';
				$dynamic_css .= '.main-menu-inner .sub-menu > li.menu-item > a:focus, .mega-category-menu .pagination-nextprev a:hover, ';
				$dynamic_css .= '.mega-category-menu .pagination-nextprev a:focus, .off-canvas-subscribe a:hover, .off-canvas-subscribe a:focus, ';
				$dynamic_css .= '.banner-link:hover, .banner-inner:focus, .cat-item a:hover .count, .widget_archive a:hover .count, ';
				$dynamic_css .= '#wp-calendar tbody a:hover, #wp-calendar #prev a:hover, #wp-calendar #next a:hover, .tagcloud a:hover, .tagcloud a:focus, ';
				$dynamic_css .= '.is-light-text .tagcloud a:hover, .is-light-text .tagcloud a:focus, .widget_mc4wp_form_widget .is-light-text .mc4wp-form input[type="submit"], ';
				$dynamic_css .= '.social-icon-wrap a:hover, .social-icon-wrap a:focus, .btn:hover, .btn:focus, .is-light-text .btn:hover, .is-light-text .btn:focus, .block-title.is-link:hover, ';
				$dynamic_css .= '.block-title.is-link:focus, .post-extra-el:hover, .post-share:hover .share-toggle, .shop-post-toggle:hover, .is-light-text .shop-post-toggle:hover, ';
				$dynamic_css .= '.post-wrap .shop-post-toggle:hover, .entry-footer a:hover, ';
				$dynamic_css .= 'a.comment-reply-link:hover, .score-bar, .post-review-info, .return-home:hover, .return-home:focus, ';
				$dynamic_css .= '.is-light-text .icon-toggle, .is-light-text .icon-toggle:before, .is-light-text .icon-toggle:after ';
				$dynamic_css .= '{ background-color: ' . esc_attr( $global_color ) . ';}';

				$dynamic_css .= 'button.mfp-close:hover, button.mfp-close:focus';
				$dynamic_css .= '{ background: ' . esc_attr( $global_color ) . ' !important;}';
			}


			if ( ! empty( $font_button['font-family'] ) && 'Montserrat' != $font_button['font-family'] ) {
				$dynamic_css .= '.btn-wrap, input[type="submit"], button, .review-description,  .review-summary-wrap h3';
				$dynamic_css .= '{ font-family:' . $font_button['font-family'] . ';}';
			}

			if ( ! empty( $font_button['font-weight'] ) && '500' != $font_button['font-weight'] ) {
				$dynamic_css .= '.btn-wrap, input[type="submit"], button, .review-description,  .review-summary-wrap h3';
				$dynamic_css .= '{ font-weight:' . $font_button['font-weight'] . ';}';
			}

			if ( ! empty( $font_button['font-style'] ) ) {
				$dynamic_css .= '.btn-wrap, input[type="submit"], button, .review-description,  .review-summary-wrap h3 ';
				$dynamic_css .= '{ font-style:' . $font_button['font-style'] . ';}';
			}

			if ( ! empty( $font_button['font-size'] ) && '13px' != $font_button['font-size'] ) {
				$dynamic_css .= '.btn-wrap, input[type="submit"], button, .review-description, .review-summary-wrap h3 ';
				$dynamic_css .= '{ font-size:' . $font_button['font-size'] . ';}';
			}

			if ( ! empty( $font_button['letter-spacing'] ) ) {
				$dynamic_css .= '.btn-wrap, input[type="submit"], button., .review-description, .review-summary-wrap h3 ';
				$dynamic_css .= '{ letter-spacing:' . $font_button['letter-spacing'] . ';}';
			}


			if ( ! empty( $font_input['font-family'] ) && 'Montserrat' != $font_input['font-family'] ) {
				$dynamic_css .= 'label, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], ';
				$dynamic_css .= 'input[type="number"], input[type="url"], input[type="search"], select, textarea';
				$dynamic_css .= '{ font-family:' . $font_input['font-family'] . ';}';
			}

			if ( ! empty( $font_input['font-weight'] ) && '400' != $font_input['font-weight'] ) {
				$dynamic_css .= 'label, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], ';
				$dynamic_css .= 'input[type="number"], input[type="url"], input[type="search"], select, textarea';
				$dynamic_css .= '{ font-weight:' . $font_input['font-weight'] . ';}';
			}

			if ( ! empty( $font_input['font-style'] ) ) {
				$dynamic_css .= 'label, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], ';
				$dynamic_css .= 'input[type="number"], input[type="url"], input[type="search"], select, textarea';
				$dynamic_css .= '{ font-style:' . $font_input['font-style'] . ';}';
			}

			if ( ! empty( $font_input['letter-spacing'] ) ) {
				$dynamic_css .= 'label, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], ';
				$dynamic_css .= 'input[type="number"], input[type="url"], input[type="search"], select, textarea';
				$dynamic_css .= '{ letter-spacing:' . $font_input['letter-spacing'] . ';}';
			}

			if ( ! empty( $font_input['font-size'] ) && '14px' != $font_input['font-size'] ) {
				$dynamic_css .= 'label, input[type="text"], input[type="tel"], input[type="password"], input[type="email"], ';
				$dynamic_css .= 'input[type="number"], input[type="url"], input[type="search"], select, textarea';
				$dynamic_css .= '{ font-size:' . $font_input['font-size'] . ';}';
			}


			if ( ! empty( $font_header_widget['font-family'] ) && 'Montserrat' != $font_header_widget['font-family'] ) {
				$dynamic_css .= '.comment-reply-title, .comment-title h3 ';
				$dynamic_css .= '{ font-family:' . $font_header_widget['font-family'] . ';}';
			}

			if ( ! empty( $font_header_widget['font-weight'] ) ) {
				$dynamic_css .= '.comment-reply-title, .comment-title h3 ';
				$dynamic_css .= '{ font-weight:' . $font_header_widget['font-weight'] . ';}';
			}

			if ( ! empty( $font_header_widget['letter-spacing'] ) ) {
				$dynamic_css .= '.comment-reply-title, .comment-title h3 ';
				$dynamic_css .= '{ letter-spacing:' . $font_header_widget['letter-spacing'] . ';}';
			}

			if ( ! empty( $font_header_widget['font-size'] ) && '16px' != $font_header_widget['font-size'] ) {
				$dynamic_css .= '.comment-reply-title, .comment-title h3';
				$dynamic_css .= '{ font-size:' . $font_header_widget['font-size'] . ';}';
			}


			if ( ! empty( $font_post_meta['font-family'] ) && 'Montserrat' != $font_post_meta['font-family'] ) {
				$dynamic_css .= '.site-description, .tagcloud a, .follower-el .num-count, .follower-el .text-count, ';
				$dynamic_css .= '.widget_pages .page_item, .widget_meta li, .widget_categories .cat-item, .widget_product_categories .cat-item, .widget_archive li, .widget.widget_nav_menu .menu-item, ';
				$dynamic_css .= '.rss-date, #wp-calendar #prev a, #wp-calendar #next a,  .ad-description, .entry-footer, ';
				$dynamic_css .= '.author-title, .author-job, .author-more, .comment-metadata, a.comment-reply-link, .share-label';
				$dynamic_css .= '{ font-family:' . $font_post_meta['font-family'] . ';}';
			}

			if ( ! empty( $font_post_meta['font-weight'] ) && '500' != $font_post_meta['font-weight'] ) {
				$dynamic_css .= '.site-description, .tagcloud a, .follower-el .num-count, .follower-el .text-count, ';
				$dynamic_css .= '.widget_pages .page_item, .widget_meta li, .widget_categories .cat-item, .widget_product_categories .cat-item, .widget_archive li, .widget.widget_nav_menu .menu-item, ';
				$dynamic_css .= '.rss-date, #wp-calendar #prev a, #wp-calendar #next a,  .ad-description, .entry-footer, ';
				$dynamic_css .= '.author-title, .author-job, .author-more, .comment-metadata, a.comment-reply-link, .share-label';
				$dynamic_css .= '{ font-weight:' . $font_post_meta['font-weight'] . ';}';
			}

			if ( ! empty( $font_post_meta['font-style'] ) ) {
				$dynamic_css .= '.site-description, .tagcloud a, .follower-el .num-count, .follower-el .text-count, ';
				$dynamic_css .= '.widget_pages .page_item, .widget_meta li, .widget_categories .cat-item, .widget_product_categories .cat-item, .widget_archive li, .widget.widget_nav_menu .menu-item, ';
				$dynamic_css .= '.rss-date, #wp-calendar #prev a, #wp-calendar #next a,  .ad-description, .entry-footer, ';
				$dynamic_css .= '.author-title, .author-job, .author-more, .comment-metadata, a.comment-reply-link, .share-label';
				$dynamic_css .= '{ font-style:' . $font_post_meta['font-style'] . ';}';
			}

			if ( ! empty( $font_post_meta['font-size'] ) && '11px' != $font_post_meta['font-size'] ) {
				$dynamic_css .= '.widget_pages .page_item, .widget_meta li, .widget_categories .cat-item, .widget_product_categories .cat-item, .widget_archive li, .widget.widget_nav_menu .menu-item, ';
				$dynamic_css .= '.rss-date, #wp-calendar #prev a, #wp-calendar #next a,  .ad-description, .entry-footer, ';
				$dynamic_css .= '.author-title, .author-job, .author-more, .comment-metadata, a.comment-reply-link, .share-label';
				$dynamic_css .= '{ font-size:' . $font_post_meta['font-size'] . ';}';
			}

			if ( ! empty( $font_post_meta['letter-spacing'] ) ) {
				$dynamic_css .= '.site-description, .tagcloud a, .follower-el .num-count, .follower-el .text-count, ';
				$dynamic_css .= '.widget_pages .page_item, .widget_meta li, .widget_categories .cat-item, .widget_product_categories .cat-item, .widget_archive li, .widget.widget_nav_menu .menu-item, ';
				$dynamic_css .= '.rss-date, #wp-calendar #prev a, #wp-calendar #next a,  .ad-description, .entry-footer, ';
				$dynamic_css .= '.author-title, .author-job, .author-more, .comment-metadata, a.comment-reply-link, .share-label';
				$dynamic_css .= '{ letter-spacing:' . $font_post_meta['letter-spacing'] . ';}';
			}


			if ( ! empty( $font_breadcrumb['font-family'] ) && 'Montserrat' != $font_breadcrumb['font-family'] ) {
				$dynamic_css .= '.pagination-wrap, .wp-caption .wp-caption-text, .nav-subtitle,.cart-counter,  .tipsy ';
				$dynamic_css .= '{ font-family:' . $font_breadcrumb['font-family'] . ';}';
			}

			if ( ! empty( $font_breadcrumb['font-size'] ) && '12px' != $font_breadcrumb['font-size'] ) {
				$dynamic_css .= '.pagination-wrap, .wp-caption .wp-caption-text, .nav-subtitle, .cart-counter, .tipsy ';
				$dynamic_css .= '{ font-size:' . $font_breadcrumb['font-size'] . ';}';
			}

			if ( ! empty( $font_breadcrumb['font-weight'] ) && '400' != $font_breadcrumb['font-weight'] ) {
				$dynamic_css .= '.pagination-wrap, .wp-caption .wp-caption-text, .nav-subtitle,.cart-counter, .tipsy ';
				$dynamic_css .= '{ font-weight:' . $font_breadcrumb['font-weight'] . ';}';
			}

			if ( ! empty( $font_breadcrumb['font-style'] ) ) {
				$dynamic_css .= '.pagination-wrap, .wp-caption .wp-caption-text, .nav-subtitle, .cart-counter, .tipsy ';
				$dynamic_css .= '{ font-style:' . $font_breadcrumb['font-style'] . ';}';
			}

			if ( ! empty( $font_breadcrumb['letter-spacing'] ) ) {
				$dynamic_css .= '.pagination-wrap, .wp-caption .wp-caption-text, .nav-subtitle, .tipsy';
				$dynamic_css .= '{ letter-spacing:' . $font_breadcrumb['letter-spacing'] . ';}';
			}


			if ( ! empty( $title_size_1 ) && 40 != $title_size_1 ) {
				$dynamic_css .= '.post-title.size-1 { font-size:' . absint( $title_size_1 ) . 'px;}';
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= 'body .post-title.size-1 { font-size:' . ceil( absint( $title_size_1 ) * 0.83 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $title_size_2 ) && 30 != $title_size_2 ) {
				$dynamic_css .= '.post-title.size-2 { font-size:' . absint( $title_size_2 ) . 'px;}';
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= 'body .post-title.size-2 { font-size:' . ceil( absint( $title_size_2 ) * 0.83 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $title_size_3 ) && 24 != $title_size_3 ) {
				$dynamic_css .= '.post-title.size-3 { font-size:' . absint( $title_size_3 ) . 'px;}';
				$dynamic_css .= '@media only screen and (min-width: 768px) and (max-width: 991px) {';
				$dynamic_css .= 'body .post-title.size-3 { font-size:' . ceil( absint( $title_size_3 ) * 0.83 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $title_size_4 ) && 17 != $title_size_4 ) {
				$dynamic_css .= '.post-title.size-4 { font-size:' . absint( $title_size_4 ) . 'px;}';
				$dynamic_css .= '@media only screen and (min-width: 768px) and (max-width: 991px) {';
				$dynamic_css .= 'body .post-title.size-4 { font-size:' . ceil( absint( $title_size_4 ) * 0.9 ) . 'px;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $font_header_block['font-size'] ) ) {
				$dynamic_css .= '@media only screen and (max-width: 991px) {';
				$dynamic_css .= '.block-title { font-size:' . ceil( absint( $font_header_block['font-size'] ) * 0.83 ) . 'px !important;}';
				$dynamic_css .= '}';
			}

			if ( ! empty( $navbar_color_bg ) ) {
				$dynamic_css .= '.navbar-wrap, .header-style-2 .navbar-wrap { background-color: ' . esc_attr( $navbar_color_bg ) . ';}';
				$dynamic_css .= '.navbar-wrap:before { display: none; }';

				if ( '#ffffff' == strtolower( $navbar_color_bg ) ) {
					$dynamic_css .= '.navbar-wrap {';
					$dynamic_css .= 'box-shadow: 0 4px 10px rgba(0,0,0,.04); -webkit-box-shadow: 0 4px 10px rgba(0,0,0,.04);';
					$dynamic_css .= '}';
				}
			}

			if ( ! empty( $navbar_color ) ) {
				$dynamic_css .= '.navbar-wrap, .header-style-2 .main-menu-inner > li > a, .header-style-2 .navbar-right ';
				$dynamic_css .= '{ color: ' . esc_attr( $navbar_color ) . ';}';
				$dynamic_css .= '.cart-counter, .header-style-2 .cart-counter  { background-color: ' . esc_attr( $navbar_color ) . ';}';
			}

			if ( ! empty( $navbar_color_hover ) && '#ff3174' != strtolower( $navbar_color_hover ) ) {
				$dynamic_css .= '.main-menu-inner > li > a:hover, .navbar-social a:hover, .navbar-right .cart-icon:hover, .navbar-right .search-icon:hover, ';
				$dynamic_css .= ' .header-style-2 .main-menu-inner > li > a:hover, .header-style-2 .main-menu-inner > li > a:focus, .header-style-2 .main-menu-inner > li.current_page_item > a, ';
				$dynamic_css .= '.header-style-2 .cart-counter:hover, .header-style-2 .cart-counter:focus';
				$dynamic_css .= '{ color: ' . esc_attr( $navbar_color_hover ) . ';}';
			}

			if ( ! empty( $navbar_color_bg_sub ) && '#000000' != strtolower( $navbar_color_bg_sub ) ) {
				$dynamic_css .= '.main-menu-inner .sub-menu { background-color: ' . esc_attr( $navbar_color_bg_sub ) . ';}';
			}

			if ( ! empty( $navbar_color_sub ) && '#ffffff' != strtolower( $navbar_color_sub ) ) {
				$dynamic_css .= '.main-menu-inner .sub-menu { color: ' . esc_attr( $navbar_color_sub ) . ';}';
				$dynamic_css .= '.sub-menu:not(.mega-category-menu) a {opacity: 1;}';
			}

			if ( ! empty( $navbar_color_hover_sub ) && '#ff3174' != strtolower( $navbar_color_hover_sub ) ) {
				$dynamic_css .= '.sub-menu:not(.mega-category-menu) a:hover, .sub-menu:not(.mega-category-menu) a:focus';
				$dynamic_css .= '{ background-color: ' . esc_attr( $navbar_color_hover_sub ) . ';}';
			}


			if ( ! empty( $hyperlink_color ) && '#111111' != strtolower( $hyperlink_color ) ) {
				$dynamic_css .= '.single .single-entry a:not(button)';
				$dynamic_css .= '{ color: ' . esc_attr( $hyperlink_color ) . ';}';
			}

			if ( ! empty( $widget_title_color ) && '#111111' != strtolower( $widget_title_color ) ) {
				$dynamic_css .= '.widget-title { color: ' . esc_attr( $widget_title_color ) . ';}';
			}

			if ( ! empty( $widget_border_color ) && '#111111' != strtolower( $widget_border_color ) ) {
				$dynamic_css .= '.widget-title { border-color: ' . esc_attr( $widget_border_color ) . ';}';
			}


			$cat_options = get_option( 'glaza_taxonomy_cat_options' );
			if ( is_array( $cat_options ) ) {
				foreach ( $cat_options as $cat_id => $val ) {
					if ( ! empty( $cat_id ) ) {
						if ( ! empty( $val['cat_color'] ) && '#000000' != strtolower( $val['cat_color'] ) && strlen( $val['cat_color'] ) > 3 ) {
							$dynamic_css .= '.meta-info-category a.cat-' . esc_attr( $cat_id ) . ', ';
							$dynamic_css .= 'is-light-text .meta-info-category a.cat-' . esc_attr( $cat_id );
							$dynamic_css .= '{ background-color: ' . esc_attr( $val['cat_color'] ) . '; color: #fff; }';
						}
					}
				}
			}

			//woocommerce
			if ( class_exists( 'WooCommerce' ) ) {

				$font_product_title  = glaza_get_option( 'font_product_title' );
				$font_product_single = glaza_get_option( 'font_product_single' );
				$font_product_stp    = glaza_get_option( 'font_product_stp' );
				$font_stp_price      = glaza_get_option( 'font_stp_price' );
				$font_single_price   = glaza_get_option( 'font_single_price' );

				$wc_price_color = glaza_get_option( 'wc_price_color' );
				$wc_sale_color  = glaza_get_option( 'wc_sale_color' );

				if ( ! empty( $global_color ) && '#ff3174' != strtolower( $global_color ) ) {
					$dynamic_css .= '.wishlist_table tr td.product-stock-status span.wishlist-out-of-stock, ';
					$dynamic_css .= '.woocommerce div.product p.stock.out-of-stock, .woocommerce div.product form.cart .reset_variations:hover, ';
					$dynamic_css .= '.woocommerce div.product .summary .yith-wcwl-add-to-wishlist a:hover, ';
					$dynamic_css .= '.woocommerce .single-product-wrap div.product > .yith-wcwl-add-to-wishlist a:hover, ';
					$dynamic_css .= '.woocommerce div.product .woocommerce-tabs .yith-wcwl-add-to-wishlist a:hover, ';
					$dynamic_css .= '.woocommerce div.product .woocommerce-tabs ul.tabs li:not(.active) a:hover';
					$dynamic_css .= '{ color: ' . esc_attr( $global_color ) . ';}';

					$dynamic_css .= '.woocommerce .woocommerce-MyAccount-navigation li:not(.is-active) a:hover, ';
					$dynamic_css .= '.woocommerce-page #payment #place_order:hover, .woocommerce div.product form.cart .button, ';
					$dynamic_css .= '.woocommerce #respond input#submit:hover, .woocommerce #respond input#submit.alt:hover, ';
					$dynamic_css .= '.woocommerce a.button.alt:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, ';
					$dynamic_css .= '.woocommerce input.button:hover, .product-buttons .add-to-cart a:hover, .woocommerce .product-buttons .add-to-cart a:hover, ';
					$dynamic_css .= '.woocommerce-mini-cart__buttons .button.checkout, .woocommerce-mini-cart__buttons .button.checkout:hover, ';
					$dynamic_css .= '.woocommerce-mini-cart__buttons .button:not(.checkout):focus, .product-buttons .add-to-cart a.added_to_cart, ';
					$dynamic_css .= '.product-buttons .yith-wcwl-add-to-wishlist a.add_to_wishlist:hover ';
					$dynamic_css .= '{ background-color: ' . esc_attr( $global_color ) . ';}';
				}


				if ( ! empty( $font_button['font-family'] ) && 'Montserrat' != $font_button['font-family'] ) {
					$dynamic_css .= '.woocommerce .button, .woocommerce .woocommerce-MyAccount-navigation, ';
					$dynamic_css .= '.woocommerce div.product .summary .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce .single-product-wrap div.product > .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce div.product .woocommerce-tabs .yith-wcwl-add-to-wishlist a ';
					$dynamic_css .= '{ font-family:' . $font_button['font-family'] . ' !important;}';
				}

				if ( ! empty( $font_button['font-weight'] ) && '500' != $font_button['font-weight'] ) {
					$dynamic_css .= '.woocommerce .button, .woocommerce .woocommerce-MyAccount-navigation, ';
					$dynamic_css .= '.woocommerce div.product .summary .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce .single-product-wrap div.product > .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce div.product .woocommerce-tabs .yith-wcwl-add-to-wishlist a ';
					$dynamic_css .= '{ font-weight:' . $font_button['font-weight'] . ' !important;}';
				}

				if ( ! empty( $font_button['font-style'] ) ) {
					$dynamic_css .= '.woocommerce .button, .woocommerce .woocommerce-MyAccount-navigation, ';
					$dynamic_css .= '.woocommerce div.product .summary .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce .single-product-wrap div.product > .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce div.product .woocommerce-tabs .yith-wcwl-add-to-wishlist a ';
					$dynamic_css .= '{ font-style:' . $font_button['font-style'] . ' !important;}';
				}

				if ( ! empty( $font_button['font-size'] ) && '13px' != $font_button['font-size'] ) {
					$dynamic_css .= '.woocommerce .button, .woocommerce .woocommerce-MyAccount-navigation, ';
					$dynamic_css .= '.woocommerce div.product .summary .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce .single-product-wrap div.product > .yith-wcwl-add-to-wishlist a, ';
					$dynamic_css .= '.woocommerce div.product .woocommerce-tabs .yith-wcwl-add-to-wishlist a ';
					$dynamic_css .= '{ font-size:' . $font_button['font-size'] . ' !important;}';
				}

				if ( ! empty( $font_button['letter-spacing'] ) ) {
					$dynamic_css .= '.woocommerce .button, .woocommerce .woocommerce-MyAccount-navigation ';
					$dynamic_css .= '{ letter-spacing:' . $font_button['letter-spacing'] . ';}';
				}

				if ( ! empty( $font_header_widget['font-family'] ) && 'Montserrat' != $font_header_widget['font-family'] ) {
					$dynamic_css .= '.woocommerce-page table.shop_table thead, .woocommerce div.product .woocommerce-tabs ul.tabs li a, ';
					$dynamic_css .= '.woocommerce #reviews #comments h2';
					$dynamic_css .= '{ font-family:' . $font_header_widget['font-family'] . ';}';
				}

				if ( ! empty( $font_header_widget['font-weight'] ) && '500' != $font_header_widget['font-weight'] ) {
					$dynamic_css .= '.woocommerce-page table.shop_table thead, .woocommerce div.product .woocommerce-tabs ul.tabs li a, ';
					$dynamic_css .= '.woocommerce #reviews #comments h2';
					$dynamic_css .= '{ font-weight:' . $font_header_widget['font-weight'] . ';}';
				}

				if ( ! empty( $font_header_widget['font-style'] ) ) {
					$dynamic_css .= '.woocommerce-page table.shop_table thead, .woocommerce div.product .woocommerce-tabs ul.tabs li a, ';
					$dynamic_css .= '.woocommerce #reviews #comments h2';
					$dynamic_css .= '{ font-style:' . $font_header_widget['font-style'] . ';}';
				}

				if ( ! empty( $font_header_widget['letter-spacing'] ) ) {
					$dynamic_css .= '.woocommerce-page table.shop_table thead, .woocommerce div.product .woocommerce-tabs ul.tabs li a, ';
					$dynamic_css .= '.woocommerce #reviews #comments h2';
					$dynamic_css .= '{ letter-spacing:' . $font_header_widget['letter-spacing'] . ';}';
				}

				if ( ! empty( $font_header_widget['font-size'] ) && '16px' != $font_header_widget['font-size'] ) {
					$dynamic_css .= '.woocommerce-page table.shop_table thead, .woocommerce div.product .woocommerce-tabs ul.tabs li a, ';
					$dynamic_css .= '.woocommerce #reviews #comments h2';
					$dynamic_css .= '{ font-size:' . $font_header_widget['font-size'] . ';}';
				}


				if ( ! empty( $font_post_meta['font-family'] ) && 'Montserrat' != $font_post_meta['font-family'] ) {
					$dynamic_css .= '.product_meta, .woocommerce .lost_password, .woocommerce-password-strength, ';
					$dynamic_css .= '.woocommerce-account .addresses .title .edit, .woocommerce.single-product .summary .woocommerce-product-rating, ';
					$dynamic_css .= '.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta, .widget_price_filter .price_label';
					$dynamic_css .= '{ font-family:' . $font_post_meta['font-family'] . ';}';
				}

				if ( ! empty( $font_post_meta['font-weight'] ) && '500' != $font_post_meta['font-weight'] ) {
					$dynamic_css .= '.product_meta, .woocommerce .lost_password, .woocommerce-password-strength, ';
					$dynamic_css .= '.woocommerce-account .addresses .title .edit, .woocommerce.single-product .summary .woocommerce-product-rating, ';
					$dynamic_css .= '.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta, .widget_price_filter .price_label';
					$dynamic_css .= '{ font-weight:' . $font_post_meta['font-weight'] . ';}';
				}

				if ( ! empty( $font_post_meta['font-style'] ) ) {
					$dynamic_css .= '.product_meta, .woocommerce .lost_password, .woocommerce-password-strength, ';
					$dynamic_css .= '.woocommerce-account .addresses .title .edit, .woocommerce.single-product .summary .woocommerce-product-rating, ';
					$dynamic_css .= '.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta, .widget_price_filter .price_label';
					$dynamic_css .= '{ font-style:' . $font_post_meta['font-style'] . ';}';
				}

				if ( ! empty( $font_post_meta['letter-spacing'] ) ) {
					$dynamic_css .= '.product_meta, .woocommerce .lost_password, .woocommerce-password-strength, ';
					$dynamic_css .= '.woocommerce-account .addresses .title .edit, .woocommerce.single-product .summary .woocommerce-product-rating, ';
					$dynamic_css .= '.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta, .widget_price_filter .price_label';
					$dynamic_css .= '{ letter-spacing:' . $font_post_meta['letter-spacing'] . ';}';
				}

				if ( ! empty( $font_post_meta['font-size'] ) && '11px' != $font_post_meta['font-size'] ) {
					$dynamic_css .= '.product_meta';
					$dynamic_css .= '{ font-size:' . $font_post_meta['font-size'] . ';}';
				}


				if ( ! empty( $font_product_title['font-family'] ) && 'Montserrat' != $font_product_title['font-family'] ) {
					$dynamic_css .= 'h1.product_title';
					$dynamic_css .= '{ font-family:' . $font_product_title['font-family'] . ';}';
				}

				if ( ! empty( $font_product_title['font-weight'] ) ) {
					$dynamic_css .= 'h1.product_title';
					$dynamic_css .= '{ font-weight:' . $font_product_title['font-weight'] . ';}';
				}

				if ( ! empty( $font_product_title['font-style'] ) ) {
					$dynamic_css .= 'h1.product_title';
					$dynamic_css .= '{ font-style:' . $font_product_title['font-style'] . ';}';
				}

				if ( ! empty( $font_product_title['letter-spacing'] ) ) {
					$dynamic_css .= 'h1.product_title';
					$dynamic_css .= '{ letter-spacing:' . $font_product_title['letter-spacing'] . ';}';
				}

				if ( ! empty( $font_product_single ) && 24 != $font_product_single ) {
					$dynamic_css .= 'h1.product_title { font-size:' . absint( $font_product_single ) . 'px;}';
					$dynamic_css .= '@media only screen and (max-width: 991px) {';
					$dynamic_css .= 'h1.product_title { font-size:' . ceil( absint( $font_product_single ) * 0.83 ) . 'px;}';
					$dynamic_css .= '}';
				}

				if ( ! empty( $font_product_stp ) && 13 != $font_product_stp ) {
					$dynamic_css .= '.shopthepost.woocommerce .woocommerce-loop-product__title { font-size:' . absint( $font_product_stp ) . 'px;}';
				}

				if ( ! empty( $font_stp_price ) && 13 != $font_stp_price ) {
					$dynamic_css .= '.shopthepost.woocommerce div.product .product-loop-content .price, .product_list_widget .woocommerce-Price-amount ';
					$dynamic_css .= '{ font-size:' . absint( $font_stp_price ) . 'px;}';
				}

				if ( ! empty( $font_single_price ) && 34 != $font_single_price ) {
					$dynamic_css .= '.woocommerce .product .summary .price';
					$dynamic_css .= '{ font-size:' . absint( $font_stp_price ) . 'px;}';
				}


				if ( ! empty( $wc_price_color ) && '#111111' != strtolower( $wc_price_color ) ) {
					$dynamic_css .= '.woocommerce div.product .product-loop-content .price, .woocommerce .product .summary .price ';
					$dynamic_css .= '{ color: ' . esc_attr( $wc_price_color ) . ';}';
				}

				if ( ! empty( $wc_sale_color ) && '#be3fff' != strtolower( $wc_sale_color ) ) {
					$dynamic_css .= '.woocommerce span.onsale';
					$dynamic_css .= '{ background-color: ' . esc_attr( $wc_sale_color ) . ';}';
				}

				if ( ! empty( $font_header_block['font-size'] ) ) {
					$dynamic_css .= '@media only screen and (max-width: 991px) {';
					$dynamic_css .= '.related.related > h2, .upsells.products > h2, .woocommerce .cross-sells > h2';
					$dynamic_css .= '{ font-size:' . ceil( absint( $font_header_block['font-size'] ) * 0.83 ) . 'px !important;}';
					$dynamic_css .= '}';
				}
			}

			$cache = addslashes( $dynamic_css );
			delete_option( 'glaza_style_cache' );
			add_option( 'glaza_style_cache', $cache );
		} else {
			$dynamic_css = stripslashes( $cache );
		}

		if ( ! empty( $dynamic_css ) ) {
			wp_add_inline_style( 'glaza-style', $dynamic_css );
		}
	}
}

if ( ! is_admin() ) {
	add_action( 'wp_enqueue_scripts', 'glaza_dynamic_style', 99 );
}


//clear css
if ( ! function_exists( 'glaza_delete_dynamic_cache' ) ) {
	function glaza_delete_dynamic_cache() {
		delete_option( 'glaza_style_cache' );

		return false;
	}
}
add_action( 'redux/options/glaza_theme_options/saved', 'glaza_delete_dynamic_cache' );
add_action( 'redux/options/glaza_theme_options/reset', 'glaza_delete_dynamic_cache' );
add_action( 'redux/options/glaza_theme_options/section/reset', 'glaza_delete_dynamic_cache' );
add_action( 'edited_category', 'glaza_delete_dynamic_cache' );
add_action( 'after_switch_theme', 'glaza_delete_dynamic_cache' );
add_action( 'activated_plugin', 'glaza_delete_dynamic_cache' );

Youez - 2016 - github.com/yon3zu
LinuXploit