color(); // secondary color $secondary_color = get_theme_mod('wpw_secondary_text_color'); $secondary_color = (!empty($secondary_color) && is_string($secondary_color)) ? json_decode(urldecode($secondary_color)) : null; $secondary_color = (isset($secondary_color[0]) && !empty($secondary_color[0])) ? $secondary_color[0] : 'rgba(0,0,0,0.6)'; // primary text color $primary_color = get_theme_mod('wpw_primary_text_color'); $primary_color = (!empty($primary_color) && is_string($primary_color)) ? json_decode(urldecode($primary_color)) : null; $primary_color = (isset($primary_color[0]) && !empty($primary_color[0])) ? $primary_color[0] : '#555'; // main color $main_color = get_theme_mod('wpw_accent_colors'); $main_color = (!empty($main_color) && is_string($main_color)) ? json_decode(urldecode($main_color)) : null; $main_color = (isset($main_color[0]) && !empty($main_color[0])) ? $main_color[0] : '#ffab00'; // accent color $accent_color = get_theme_mod('wpw_accent_colors'); $accent_color = (!empty($accent_color) && is_string($accent_color)) ? json_decode(urldecode($accent_color)) : null; $accent_color = (isset($accent_color[0]) && !empty($accent_color[0])) ? $accent_color[0] : '#ffab00'; // divider color $divider_color = get_theme_mod('wpw_divider_color'); $divider_color = (!empty($divider_color) && is_string($divider_color)) ? json_decode(urldecode($divider_color)) : null; $divider_color = (isset($divider_color[0]) && !empty($divider_color[0])) ? $divider_color[0] : 'rgba(0,0,0,.3)'; /** * Blog */ $divider_bg = get_theme_mod('wpw_bg_body'); $divider_bg = Wpw::inst()->formatter()->from_bg($divider_bg); $main_color_block_text = $color->is($main_color, 460) ? '#fff' : '#555'; $main_color_block_text_hover = $color->set_alpha($main_color_block_text, .7); // headings $headings_font_color = get_theme_mod('wpw_headings_text_color'); $headings_font_color = (!empty($headings_font_color) && is_string($headings_font_color)) ? json_decode(urldecode($headings_font_color), true) : null; $headings_font_color = (isset($headings_font_color[0]) && !empty($headings_font_color[0]) && !is_numeric($headings_font_color[0])) ? $headings_font_color[0] : ''; // lines color $lines_color = $color->transform($secondary_color, 80, Wpw_Color_Transformer::TRANSFORM_LIGHTEN); // color line after for widgets $raw = get_theme_mod('wpw_widgets_element'); $opts = !empty($raw) ? json_decode(urldecode($raw), true) : []; $widget_title_content = isset($opts['enable_widgets']) && $opts['enable_widgets'] ? '""' : 'none'; $overlay_color = Wpw::inst()->color()->set_alpha($primary_color, '.5'); //====================================Style================================================================// $style = ''; $style .= /** @lang CSS */ ' /*SHOP*/ .woocommerce-review-link { display: none; } .widget_price_filter .price_slider .ui-slider-range, .product-list .product .product-wrap .product-img .onsale, .products .product .product-wrap .product-img .onsale { background-color: ' . $main_color . '; } .stars > span > a.active, .star-rating > span { color: ' . $main_color . '; } /*CART*/ .container.wpw-cart { border: 1px solid ' . $divider_color . '; } .wpw-cart__header, .wpw-cart__item:not(:last-child) { border-bottom: 1px solid ' . $divider_color . '; } .wpw-cart__header-item:not(:last-child), .wpw-cart__cell:not(:last-child) { border-right: 1px solid ' . $divider_color . '; } .invert-overlay:after { background-color: ' . $overlay_color . '; } /*Blog*/ .blog-post-navigation a { color: ' . $secondary_color . ' !important; fill: ' . $secondary_color . ' !important; } .blog-post-navigation a:hover { color: ' . $accent_color . ' !important; fill: ' . $accent_color . ' !important; } .secondary-color, .product-list .product .product-wrap .product-img .onsale, .products .product .product-wrap .product-img .onsale { color: ' . $secondary_color . '; } .blog-author { color: ' . $headings_font_color . '; } .content-box { border-color: ' . $lines_color . '; } .wpw-comment-form input, .wpw-comment-form textarea { color: ' . $primary_color . '; background-color: ' . $divider_bg['color'] . '; } ul ol li:before, ol ul li:before, ol li:before { color: ' . $primary_color . '; } .main-color-block a, .color-line-after:after, .color-line-before:before, .main-color-block { background-color: ' . $main_color . '; color: ' . $main_color_block_text . '; } .widget .widget-title h3.color-line-after:after { content: ' . $widget_title_content . '; } .main-color-block a:hover, a.main-color-block:hover { color: ' . $main_color_block_text_hover . '; } .comment-date { color: ' . $secondary_color . '; } .wpw-comment-content { border-color: ' . $secondary_color . '; } .comment-reply-link, .comment-edit-link { color: ' . $headings_font_color . '; } .wpw-related-posts__nav-left, .wpw-related-posts__nav-right { color: ' . $primary_color . '; } .info-box-icon { color: ' . $main_color . '; } .wpw-related-posts__nav-dot:before { background-color: ' . $main_color . '; } .wpw-related-posts__nav-dot:after { border-color: ' . $primary_color . '; } .wpw-post-comments-wrapper-title, .no-list.wpw-post-comments-list .wpw-comment, .blog-post-navigation { border-color: ' . $divider_color . '; } '; return $style;