formatter(); //font $font = get_theme_mod('wpw_body_font'); // font size $size = get_theme_mod('wpw_body_font_size'); if (empty($size) || strlen($size) < 5) { $size = '%7B%22number%22%3A%2214%22%2C%22unit%22%3A%22%22%7D'; } // text transform $text_transform_default = get_theme_mod('wpw_headings_text_transform'); // small caps default $small_caps = get_theme_mod('wpw_small_caps'); // letter spacing $letter_spacing = get_theme_mod('wpw_headings_font_letter_spacing'); if (empty($letter_spacing)) { $letter_spacing = '%7B%22number%22%3A%220.075%22%2C%22unit%22%3A%22rem%22%7D'; } // 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'; // accent color $accent_color = get_theme_mod('wpw_accent_colors'); $accent_color = (!empty($accent_color) && is_string($accent_color)) ? json_decode(urldecode($accent_color), true) : null; $accent_color = (isset($accent_color[0]) && !empty($accent_color[0])) ? $accent_color[0] : '#ffab00'; // typography $subtitle_typography = !empty($config['subtitle_typography']) ? $config['subtitle_typography'] : 'main'; $subtitle_typography = $formatter->dynamic_typography($subtitle_typography, '.ui-datepicker .ui-datepicker-title, .ui-datepicker-calendar tr th > span, table:not(#wp-calendar):not(.gfield_list):not(.ui-datepicker-calendar) th, body .subtitle > a, .subtitle > h1, body .subtitle > h1 > a, body .subtitle a, .subtitle > h2, body .subtitle > h2 > a, .subtitle > h3, body .subtitle > h3 > a, .subtitle > h4, body .subtitle > h4 > a, .subtitle > h5, body .subtitle > h5 > a, .subtitle > h6, body .subtitle a, body .subtitle > h6 > a, .subtitle'); // indents $subtitle_margins = !empty($config['subtitle_margins']) ? $config['subtitle_margins'] : ''; $subtitle_margins = $formatter->css_spacing($subtitle_margins); // border $subtitle_border_style = !empty($config['subtitle_border_style']) ? $config['subtitle_border_style'] : ''; $subtitle_border_model = !empty($config['subtitle_border_model']) ? $config['subtitle_border_model'] : ''; $subtitle_border_color = !empty($config['subtitle_border_color']) ? $config['subtitle_border_color'] : ''; $subtitle_border_color = Wpw::inst()->storage()->get($subtitle_border_color); $subtitle_border = $formatter->css_border_simplify( $subtitle_border_style, $subtitle_border_model, $subtitle_border_color ); $subtitle_border_radius = !empty($config['subtitle_border_radius']) ? $config['subtitle_border_radius'] : ''; $subtitle_border_radius = $formatter->css_spacing($subtitle_border_radius); // colors $subtitle_default_color = !empty($config['subtitle_default_color']) ? $config['subtitle_default_color'] : 'on'; $subtitle_text_color = !empty($config['subtitle_text_color']) ? $config['subtitle_text_color'] : ''; $subtitle_text_color = Wpw::inst()->storage()->get($subtitle_text_color); $subtitle_bg_color = !empty($config['subtitle_bg_color']) ? $config['subtitle_bg_color'] : ''; $subtitle_bg_color = Wpw::inst()->storage()->get($subtitle_bg_color); $subtitle_text_color_invert = ''; $subtitle_bg_color_invert = ''; if ($subtitle_default_color == 'on') { $subtitle_text_color = $subtitle_bg_color = $subtitle_text_color_invert = $subtitle_bg_color_invert = ''; } // underline $subtitle_show_underline = !empty($config['subtitle_show_underline']) ? $config['subtitle_show_underline'] : 'on'; $subtitle_underline_content = $subtitle_show_underline == 'on' ? '""' : 'none'; $subtitle_underline_color = !empty($config['subtitle_underline_color']) ? $config['subtitle_underline_color'] : ''; $subtitle_underline_color = Wpw::inst()->storage()->get($subtitle_underline_color); $subtitle_underline_margins = !empty($config['subtitle_underline_margins']) ? $config['subtitle_underline_margins'] : ''; $subtitle_underline_margins = $formatter->css_spacing($subtitle_underline_margins); $subtitle_underline_height = !empty($config['subtitle_underline_height']) ? $config['subtitle_underline_height'] : '%7B%22number%22%3A%224%22%2C%22unit%22%3A%22rem%22%7D'; $subtitle_underline_height = $formatter->from_slider($subtitle_underline_height); $subtitle_underline_height = $subtitle_underline_height['number']; if ($subtitle_show_underline == 'off') { $subtitle_underline_height = $subtitle_underline_color = $subtitle_underline_margins = ''; } echo /** @lang CSS */ ' ' . $subtitle_typography . ' .ui-datepicker .ui-datepicker-title, .ui-datepicker-calendar tr th > span, .subtitle { margin: ' . $subtitle_margins . '; color: ' . $subtitle_text_color . '; background-color: ' . $subtitle_bg_color . '; border-radius: ' . $subtitle_border_radius . '; ' . $subtitle_border . ' } table:not(#wp-calendar):not(.gfield_list):not(.ui-datepicker-calendar) th, .ui-datepicker .ui-datepicker-title, .ui-datepicker-calendar tr th > span, table:not(#wp-calendar):not(.gfield_list):not(.ui-datepicker-calendar) th, body .subtitle > a, .subtitle > h1, body .subtitle > h1 > a, body .subtitle a, .subtitle > h2, body .subtitle > h2 > a, .subtitle > h3, body .subtitle > h3 > a, .subtitle > h4, body .subtitle > h4 > a, .subtitle > h5, body .subtitle > h5 > a, .subtitle > h6, body .subtitle > h6 > a .subtitle { color: ' . $subtitle_text_color . '; } .ui-datepicker-calendar tr th > span:after, .subtitle:after { content: ' . $subtitle_underline_content . '; background-color: ' . $subtitle_underline_color . '; margin: ' . $subtitle_underline_margins . '; height: ' . $subtitle_underline_height . 'px; } .invert-colors .ui-datepicker-calendar tr th > span, .invert-colors .subtitle { color: ' . $subtitle_text_color_invert . '; background-color: ' . $subtitle_bg_color_invert . '; } ';