formatter(); // primary color $primary_color = get_theme_mod('wpw_primary_colors'); $primary_color = (!empty($primary_color) && is_string($primary_color)) ? json_decode(urldecode($primary_color), true) : null; $primary_color = (isset($primary_color[0]) && !empty($primary_color[0])) ? $primary_color[0] : '#000'; // primary text color $primary_text_color = get_theme_mod('wpw_primary_text_color'); $primary_text_color = (!empty($primary_text_color) && is_string($primary_text_color)) ? json_decode(urldecode($primary_text_color), true) : null; $primary_text_color = (isset($primary_text_color[0]) && !empty($primary_text_color[0])) ? $primary_text_color[0] : '#555'; // primary text color $primary_text_color_invert = get_theme_mod('wpw_primary_text_color_invert'); $primary_text_color_invert = (!empty($primary_text_color_invert) && is_string($primary_text_color_invert)) ? json_decode(urldecode($primary_text_color_invert), true) : null; $primary_text_color_invert = (isset($primary_text_color_invert[0]) && !empty($primary_text_color_invert[0])) ? $primary_text_color_invert[0] : '#aaaaaa'; // typography $notify_typography = !empty($config['notify_typography']) ? $config['notify_typography'] : 'main'; $notify_typography = $formatter->dynamic_typography($notify_typography, '.wpw .woocommerce-message:not(:empty) , .wpw .screen-reader-response:not(:empty) , .wpw .validation_error:not(:empty) , .wpw .validation_message:not(:empty) , .wpw .wpcf7-not-valid-tip:not(:empty) , .wpw .mc4wp-alert:not(:empty), .wpw .gform_confirmation_message:not(:empty) , .wpw .wpcf7-response-output:not(:empty) , .wpw .project-notify:not(:empty)'); // indents $notify_paddings = !empty($config['notify_paddings']) ? $config['notify_paddings'] : ''; $notify_paddings = $formatter->css_spacing($notify_paddings); $notify_margins = !empty($config['notify_margins']) ? $config['notify_margins'] : ''; $notify_margins = $formatter->css_spacing($notify_margins); // border $notify_border_style = !empty($config['notify_border_style']) ? $config['notify_border_style'] : ''; $notify_border_model = !empty($config['notify_border_model']) ? $config['notify_border_model'] : ''; $notify_border_color = !empty($config['notify_border_color']) ? $config['notify_border_color'] : ''; $notify_border_color = Wpw::inst()->storage()->get($notify_border_color); $notify_border = $formatter->css_border_simplify( $notify_border_style, $notify_border_model, $notify_border_color ); $notify_border_radius = !empty($config['notify_border_radius']) ? $config['notify_border_radius'] : ''; $notify_border_radius = $formatter->css_spacing($notify_border_radius); // colors $notify_default_color = !empty($config['notify_default_color']) ? $config['notify_default_color'] : 'off'; $notify_text_color = !empty($config['notify_text_color']) ? $config['notify_text_color'] : ''; $notify_text_color = Wpw::inst()->storage()->get($notify_text_color); if ($notify_default_color == 'on') { $notify_text_color = $notify_bg_color = $notify_text_color_invert = $notify_bg_color_invert = ''; } // background $notify_bg = !empty($config['notify_bg']) ? $config['notify_bg'] : ''; $notify_bg = $formatter->from_bg($notify_bg); // shadow $notify_bs_hl = !empty($config['notify_bs_hl']) ? $config['notify_bs_hl'] : ''; $notify_bs_hl = $formatter->css_scalar($notify_bs_hl); $notify_bs_vl = !empty($config['notify_bs_vl']) ? $config['notify_bs_vl'] : ''; $notify_bs_vl = $formatter->css_scalar($notify_bs_vl); $notify_bs_br = !empty($config['notify_bs_br']) ? $config['notify_bs_br'] : ''; $notify_bs_br = $formatter->css_scalar($notify_bs_br); $notify_bs_sr = !empty($config['notify_bs_sr']) ? $config['notify_bs_sr'] : ''; $notify_bs_sr = $formatter->css_scalar($notify_bs_sr); $notify_bs_color = !empty($config['notify_bs_color']) ? $config['notify_bs_color'] : ''; $notify_bs_color = Wpw::inst()->storage()->get($notify_bs_color); $notify_bs = " box-shadow: {$notify_bs_hl} {$notify_bs_vl} {$notify_bs_br} {$notify_bs_sr} {$notify_bs_color}; "; $notify_max_width = !empty($config['notify_max_width']) ? $config['notify_max_width'] : '%7B%22number%22%3A%22200%22%2C%22unit%22%3A%22%22%7D'; $notify_max_width = $formatter->css_scalar($notify_max_width); echo /** @lang CSS */ ' ' . $notify_typography . ' .wpw .woocommerce-message:not(:empty) , .wpw .screen-reader-response:not(:empty) , .wpw .validation_error:not(:empty) , .wpw .validation_message:not(:empty) , .wpw .wpcf7-not-valid-tip:not(:empty) , .wpw .mc4wp-alert:not(:empty), .wpw .gform_confirmation_message:not(:empty) , .wpw .wpcf7-response-output:not(:empty) , .wpw .project-notify:not(:empty) { padding: ' . $notify_paddings . '; margin: ' . $notify_margins . '; color: ' . $notify_text_color . '; border-radius: ' . $notify_border_radius . '; ' . $notify_border . ' ' . $notify_bs . ' } .wpcf7-response-output:not(:empty), .screen-reader-response:not(:empty), .gform_confirmation_message:not(:empty), .validation_error:not(:empty), .mc4wp-alert:not(:empty), .wpcf7-not-valid-tip:not(:empty), .validation_message:not(:empty), .woocommerce-message:not(:empty) { background-image: url("' . $notify_bg['image'] . '"); } .wpcf7-response-output:not(:empty):before, .screen-reader-response:not(:empty):before, .validation_error:not(:empty):before, .wpcf7-not-valid-tip:not(:empty):before, .mc4wp-alert:not(:empty):before, .validation_message:not(:empty):before, .gform_confirmation_message:not(:empty):before, .woocommerce-message:not(:empty):before { ' . $notify_bg['fill'] . ' border-radius: ' . $notify_border_radius . '; } .project-notify .project-bg__color { background-color: ' . $notify_bg['color'] . '; } .project-notify .project-bg__gradient { ' . $notify_bg['gradient'] . ' } .project-notify .project-bg__image { background-image: url(' . $notify_bg['image'] . '); } ';