li > ul > li.current_page_item > a, #jqueryslidemenu ul.nav > li > ul > li.current_page_parent > a, .woocommerce p.stars a, .ql_cart-btn .count, #jqueryslidemenu ul.nav > li > a:hover, .ql_secundary_btn, .absolutte-mini-cart .woocommerce-mini-cart__buttons .button, .absolutte-product-view .absolutte-product-desc .summary .entry .price, .woocommerce .absolutte-product-view .absolutte-product-desc .summary .entry .price, .absolutte-login-btn:hover, .absolutte-login-btn:focus, .woocommerce #review_form #respond .form-submit input, .woocommerce-page #review_form #respond .form-submit input, .woocommerce-cart .actions input[type='submit'], .woocommerce .widget_price_filter .price_slider_amount .button, .woocommerce-account .edit, .woocommerce a.added_to_cart, .post-password-form input[type='submit'], .woocommerce #main .products li.product .product_text .button, .woocommerce-page .products li.product .product_text .button, .woocommerce ul.products li.product .product_text .button, ul.products li.product .product_text .button, .woocommerce #main .products li.product .product_text .add_to_cart_button, .woocommerce-page .products li.product .product_text .add_to_cart_button, .woocommerce ul.products li.product .product_text .add_to_cart_button, ul.products li.product .product_text .add_to_cart_button, .woocommerce a.added_to_cart, #ql_load_more, .absolutte-service .absolutte-service-content-wrap .absolutte-service-title, .absolutte-service.absolutte-service-style-7 .absolutte-service-action a, .absolutte-section-title, .absolutte-section-title-small, .main-navigation li li.focus > a, .main-navigation li li:focus > a, .main-navigation li li:hover > a, .main-navigation li li a:hover, .main-navigation li li a:focus, .main-navigation li li.current_page_item a:hover, .main-navigation li li.current-menu-item a:hover, .main-navigation li li.current_page_item a:focus, .main-navigation li li.current-menu-item a:focus, .no-touch .post-title a:hover"; } /** * CSS Classes * Featured Color * Background Color * */ function absolutte_featured_background_color() { return ".pagination .current, .pagination li.active a, .section-title::before, .ql_primary_btn, #jqueryslidemenu ul.nav > li > ul > li a:hover, #jqueryslidemenu .navbar-toggle .icon-bar, .absolutte-home-slider-fullscreen .slider-fullscreen-controls .prevnext-button, .pace .pace-progress, .woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce nav.woocommerce-pagination ul li span.current, .woocommerce nav.woocommerce-pagination ul li a:hover, .ql_woo_cart_button:hover, .ql_woo_cart_close, .woocommerce .woocommerce-MyAccount-navigation ul .woocommerce-MyAccount-navigation-link.is-active a, .woocommerce_checkout_btn, .post-navigation .nav-next a:hover::before, .post-navigation .nav-previous a:hover::before, .woocommerce #main .single_add_to_cart_button, .absolutte-contact-form input[type='submit'], .woocommerce-cart .wc-proceed-to-checkout a.checkout-button, .woocommerce #payment #place_order, .woocommerce-page #payment #place_order, .contact-form input[type='submit'], .portfolio-load-wrapper .portfolio-load-more, .absolutte-preloader .absolutte-folding-cube .absolutte-cube::before, .woocommerce .widget_price_filter .price_slider_wrapper .ui-widget-content, .no-touch .ql_secundary_btn:hover, .no-touch .absolutte-mini-cart .woocommerce-mini-cart__buttons .button:hover, .absolutte-mini-cart .woocommerce-mini-cart__buttons .button.checkout, .ql_woocommerce_categories ul li.current a, .woocommerce #main .products li.product .product_text .product_type_external, .woocommerce-page .products li.product .product_text .product_type_external, .woocommerce ul.products li.product .product_text .product_type_external, ul.products li.product .product_text .product_type_external, .absolutte-product-view .absolutte-product-desc .summary .entry a.button, .woocommerce .absolutte-product-view .absolutte-product-desc .summary .entry a.button, .woocommerce #main .single_add_to_cart_button, .woocommerce .absolutte-product-view button.single_add_to_cart_button, .woocommerce .absolutte-product-view a.single_add_to_cart_button, .no-touch .woocommerce #review_form #respond .form-submit input:hover, .no-touch .woocommerce-page #review_form #respond .form-submit input:hover, .no-touch .woocommerce-cart .actions input[type='submit']:hover, .no-touch .woocommerce .widget_price_filter .price_slider_amount .button:hover, .no-touch .woocommerce-account .edit:hover, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .no-touch .post-password-form input[type='submit']:hover, .absolutte-double-bounce1, .absolutte-double-bounce2, .absolutte-sidebar-wrapper #absolutte-shop-cart-panel .woocommerce-mini-cart__buttons .button.checkout, .no-touch .woocommerce a.added_to_cart:hover, .absolutte-preloader .absolutte-double-bounce1, .absolutte-preloader .absolutte-double-bounce2, .absolutte-section-title::after, .absolutte-section-title-small::after, .main-navigation ul ul a::before, .pagination_wrap .pagination a.current, .pagination_wrap .pagination span.current"; } /** * CSS Classes * Featured Color * Border Color * */ function absolutte_featured_border_color() { return ".pagination li.active a, .pagination li.active a:hover, .section-title::after, .pace .pace-activity, .ql_woocommerce_categories ul li.current, .ql_woocommerce_categories ul li:hover, .woocommerce_checkout_btn, .ql_woocommerce_categories .ql_product_search:hover .woocommerce-product-search #woocommerce-product-search-field, .touch .ql_woocommerce_categories .ql_product_search:hover .woocommerce-product-search #woocommerce-product-search-field .absolutte-contact-form input[type='text']:focus, .absolutte-contact-form input[type='email']:focus, .absolutte-contact-form textarea:focus, .ql_secundary_btn, .absolutte-mini-cart .woocommerce-mini-cart__buttons .button, .woocommerce #review_form #respond .form-submit input, .woocommerce-page #review_form #respond .form-submit input, .woocommerce-cart .actions input[type='submit'], .woocommerce .widget_price_filter .price_slider_amount .button, .woocommerce-account .edit, .ql_woocommerce_categories .ql_product_search:hover .woocommerce-product-search #woocommerce-product-search-field, .touch .ql_woocommerce_categories .ql_product_search:hover .woocommerce-product-search #woocommerce-product-search-field, .ql_woocommerce_categories .ql_product_search:hover .woocommerce-product-search #woocommerce-product-search-field-0, .touch .ql_woocommerce_categories .ql_product_search:hover .woocommerce-product-search #woocommerce-product-search-field-0, .post-password-form input[type='submit'], .woocommerce #main .products li.product .product_text .button, .woocommerce-page .products li.product .product_text .button, .woocommerce ul.products li.product .product_text .button, ul.products li.product .product_text .button, .woocommerce #main .products li.product .product_text .add_to_cart_button, .woocommerce-page .products li.product .product_text .add_to_cart_button, .woocommerce ul.products li.product .product_text .add_to_cart_button, ul.products li.product .product_text .add_to_cart_button, .woocommerce a.added_to_cart, #ql_load_more, .no-touch .absolutte-service.absolutte-service-style-7:hover, .comment-list .comment.bypostauthor .comment-body, .main-navigation ul ul, .no-touch .blog #content .post .entry-footer .metadata ul li a:hover, .no-touch .archive #content .post .entry-footer .metadata ul li a:hover, .no-touch .search #content .post .entry-footer .metadata ul li a:hover "; } /** * CSS Classes * Secondary Color * Color * */ function absolutte_secondary_color() { return ""; } /** * CSS Classes * Secondary Color * Background Color * */ function absolutte_secondary_background_color() { return ".absolutte-button, .comment-form .form-submit input[type='submit']"; } /** * CSS Classes * Secondary Color * Border Color * */ function absolutte_secondary_border_color() { return ""; } /** * Enqueues front-end CSS for color scheme. * * @see wp_add_inline_style() */ function absolutte_custom_css() { /* Colors */ $heroColor = esc_html( get_theme_mod( 'absolutte_featured_color', '#6683e2' ) ); $secondaryColor = esc_html( get_theme_mod( 'absolutte_secondary_color', '#2fc77c' ) ); $headings_color = esc_html( get_theme_mod( 'absolutte_headings_color', '#222222' ) ); $text_color = esc_html( get_theme_mod( 'absolutte_text_color', '#777777' ) ); $link_color = esc_html( get_theme_mod( 'absolutte_link_color', '#6683e2' ) ); $content_background_color = esc_html( get_theme_mod( 'absolutte_content_background_color', '#FFFFFF' ) ); $footer_background = esc_html( get_theme_mod( 'absolutte_footer_background', '#FFFFFF' ) ); $site_gradient = esc_html( get_theme_mod( 'absolutte_site_gradient', '1' ) ); $site_background_color = esc_html( get_theme_mod( 'absolutte_site_background_color', '#e08461' ) ); $logo_color = esc_html( get_theme_mod( 'absolutte_logo_color', '#222222' ) ); $header_bck_color = esc_html( get_theme_mod( 'absolutte_header_bck_color', '#FFFFFF' ) ); $header_lines_color = esc_html( get_theme_mod( 'absolutte_header_lines_color', '#EEEEEE' ) ); $quick_view_bck = esc_html( get_theme_mod( 'absolutte_shop_quick_view_bck', '#efefef' ) ); $colors = array( 'heroColor' => $heroColor, 'secondaryColor' => $secondaryColor, 'headings_color' => $headings_color, 'text_color' => $text_color, 'link_color' => $link_color, 'content_background_color' => $content_background_color, 'footer_background' => $footer_background, 'site_gradient' => $site_gradient, 'site_background_color' => $site_background_color, 'logo_color' => $logo_color, 'header_bck_color' => $header_bck_color, 'header_lines_color' => $header_lines_color, 'quick_view_bck' => $quick_view_bck, ); $custom_css = absolutte_get_custom_css( $colors ); wp_add_inline_style( 'absolutte_style', $custom_css ); /* Typography */ $absolutte_typography_font_family = esc_html( get_theme_mod( 'absolutte_typography_font_family', 'Lato' ) ); $absolutte_typography_font_family_headings = esc_html( get_theme_mod( 'absolutte_typography_font_family_headings', 'Lato' ) ); $absolutte_typography_subsets = esc_html( get_theme_mod( 'absolutte_typography_subsets', '' ) ); $absolutte_typography_font_size = esc_html( get_theme_mod( 'absolutte_typography_font_size', '16' ) ); $typography = array( 'font-family' => $absolutte_typography_font_family, 'font-family-headings' => $absolutte_typography_font_family_headings, 'font-size' => $absolutte_typography_font_size, ); //Add Google Fonts $absolutte_font_subset = ''; if ( is_array( $absolutte_typography_subsets ) ) { $absolutte_font_subset = '&subset='; foreach ( $absolutte_typography_subsets as $subset ) { $absolutte_font_subset .= $subset . ','; } $absolutte_font_subset = rtrim( $absolutte_font_subset, ',' ); } $absolutte_google_font = '//fonts.googleapis.com/css?family=' . $absolutte_typography_font_family . ':400,700' . $absolutte_font_subset; wp_enqueue_style( 'absolutte_google-font', $absolutte_google_font, array(), '1.0', 'all'); $absolutte_google_font_headings = '//fonts.googleapis.com/css?family=' . $absolutte_typography_font_family_headings . ':100,400,700' . $absolutte_font_subset; wp_enqueue_style( 'absolutte_google-font-headings', $absolutte_google_font_headings, array(), '1.0', 'all'); $custom_css = absolutte_get_custom_typography_css( $typography ); wp_add_inline_style( 'absolutte_style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'absolutte_custom_css' ); /** * Returns CSS for the color schemes. * * @param array $colors colors. * @return string CSS. */ function absolutte_get_custom_css( $colors ) { //Default colors $colors = wp_parse_args( $colors, array( 'heroColor' => '#fd6848', 'secondaryColor' => '#2fc77c', 'headings_color' => '#222222', 'text_color' => '#777777', 'link_color' => '#fd6848', 'content_background_color' => '#FFFFFF', 'footer_background' => '#FFFFFF', 'site_gradient' => '1', 'site_background_color' => '#e08461', 'logo_color' => '#222222', 'header_bck_color' => '#FFFFFF', 'header_lines_color' => '#EEEEEE', 'quick_view_bck' => '#efefef', ) ); // Site Background Color $background_color = get_background_color(); $heroColor_darker = absolutte_darken_color( $colors['heroColor'], 1.1 ); $link_color_darker = absolutte_darken_color( $colors['link_color'], 1.2 ); $heroColor_rgb = absolutte_hex2rgb( $colors['heroColor'] ); $secondaryColor_darker = absolutte_darken_color( $colors['secondaryColor'], 1.1 ); // Custom CSS for the current page only $absolutte_header_bck_color = rwmb_meta( 'absolutte_header_bck_color' ); $absolutte_header_logo_color = rwmb_meta( 'absolutte_header_logo_color' ); $absolutte_header_text_color = rwmb_meta( 'absolutte_header_text_color' ); $absolutte_header_hover_color = rwmb_meta( 'absolutte_header_hover_color' ); $absolutte_header_mobile_menu_bck_color = rwmb_meta( 'absolutte_header_mobile_menu_bck_color' ); // If is Shop page we need to pass the page ID if( function_exists( 'is_shop' ) && is_shop() ) { $shop_id = get_option( 'woocommerce_shop_page_id' ); $absolutte_header_bck_color = rwmb_meta( 'absolutte_header_bck_color', '', $shop_id ); $absolutte_header_logo_color = rwmb_meta( 'absolutte_header_logo_color', '', $shop_id ); $absolutte_header_text_color = rwmb_meta( 'absolutte_header_text_color', '', $shop_id ); $absolutte_header_hover_color = rwmb_meta( 'absolutte_header_hover_color', '', $shop_id ); $absolutte_header_mobile_menu_bck_color = rwmb_meta( 'absolutte_header_mobile_menu_bck_color', '', $shop_id ); } $css = << li, .absolutte-sidenav #header .logo_container, .ql_cart-btn, #header, .single-product #header, .top-bar, .absolutte-sidenav #header, .logo_container::before, .absolutte-header-2 #header .logo_container::before, .absolutte-header-2 #header #ql_nav_collapse #jqueryslidemenu ul.nav > li, .absolutte-header-2 #header #ql_nav_collapse #jqueryslidemenu ul.nav > li:last-child, .absolutte-header-2 #header .ql_cart-btn, .absolutte-sidenav #header .main-navigation ul li { border-color: {$colors['header_lines_color']}; } /* Quick View Background Color */ .absolutte-product-view, .woocommerce .absolutte-product-view { background-color: {$colors['quick_view_bck']}; } /* Darker Secondary Color */ .absolutte-button:hover, .absolutte-button-secondary:hover, .absolutte-app-store-button:hover, .comment-form .form-submit input:hover[type="submit"], .absolutte-button:focus, .absolutte-button-secondary:focus, .absolutte-app-store-button:focus, .comment-form .form-submit input:focus[type="submit"]{ background-color: {$secondaryColor_darker}; } /* Current Page Header Styles */ body #header, body .single-product #header, body .absolutte-sidenav #header, body .top-bar, body .single-product .top-bar{ background-color: {$absolutte_header_bck_color} !important; } body #header .absolutte-logo-wrap .site-title .ql_logo{ color: {$absolutte_header_logo_color} !important; } body .main-navigation a, body #header, body #header .absolutte-icons-nav-wrap ul li a, body #header .nav_social li a{ color: {$absolutte_header_text_color}; } .no-touch body #header .absolutte-icons-nav-wrap ul li a:hover, .no-touch .main-navigation .menu > li > a:hover, .main-navigation li:hover > a, .no-touch #header .absolutte-icons-nav-wrap ul li a:hover, .no-touch .absolutte-header-side-small #header .absolutte-header-side-btn-wrap #absolutte-header-side-btn:hover, .no-touch .absolutte-header-side-small #header .absolutte-icons-nav-wrap ul li a:hover, .no-touch .absolutte-header-side-small #header .main-navigation a:hover, .no-touch #header .main-navigation ul.menu > li > a:hover, .no-touch .main-navigation ul > li > a:hover{ color: {$absolutte_header_hover_color}; } @media (max-width: 767px) { .main-navigation{ background-color: {$absolutte_header_mobile_menu_bck_color}; } } CSS; return $css; } /** * Returns CSS for the typography styles. * * @param array $typography typography. * @return string CSS. */ function absolutte_get_custom_typography_css( $typography ) { //Default colors $typography = wp_parse_args( $typography, array( 'font-family' => 'Lato', 'font-family-headings' => 'Lato', 'font-size' => '16', ) ); $css = << li, .sub-footer, .ql_filter ul li, .post-navigation .nav-next a, .post-navigation .nav-previous a, .read-more, .portfolio-load-wrapper .portfolio-load-more, .woocommerce .woocommerce-breadcrumb, #main .woocommerce-result-count, #ql_load_more, .woocommerce #main .single_add_to_cart_button, .contact-form input[type="submit"], #respond .form-submit #submit-respond, .woocommerce-cart .actions input[type='submit'], .woocommerce-cart .actions input[type='submit'], .woocommerce-cart .wc-proceed-to-checkout a.checkout-button, .woocommerce #payment #place_order, .woocommerce-page #payment #place_order, .absolutte-offer-banner .absolutte-offer-banner-countdown .absolutte-offer-banner-time, .absolutte-product-metadata, .absolutte-product-view .absolutte-product-desc .summary .entry .price, .woocommerce .absolutte-product-view .absolutte-product-desc .summary .entry .price, .woocommerce .widget_price_filter .price_slider_amount .button, .main-navigation ul, .absolutte-mini-cart .woocommerce-mini-cart li.woocommerce-mini-cart-item, .absolutte-mini-cart .woocommerce-mini-cart__buttons .button, .absolutte-mini-cart .woocommerce-mini-cart__buttons .button.checkout, .woocommerce #main .single_add_to_cart_button, .woocommerce .absolutte-product-view button.single_add_to_cart_button, .woocommerce .absolutte-product-view a.single_add_to_cart_button { font-family: {$typography['font-family-headings']}; } CSS; return $css; } /** * Returns CSS for the typography styles for Admin * * @param array $typography typography. * @return string CSS. */ function absolutte_get_admin_custom_typography_css( $typography ) { //Default colors $typography = wp_parse_args( $typography, array( 'font-family' => 'Lato', 'font-family-headings' => 'Lato', 'font-size' => '16', ) ); $css = << $absolutte_typography_font_family, 'font-family-headings' => $absolutte_typography_font_family_headings, 'font-size' => $absolutte_typography_font_size, ); $custom_css = absolutte_get_admin_custom_typography_css( $typography ); echo ''; } add_action( 'admin_head', 'absolutte_admin_typography' );