formatter(); $storage = $wpw->storage(); unset($wpw); $class_name = !empty($config['class_name']) ? '.' . $config['class_name'] : '.search-widget-primary'; /** * Wrapper */ // Color =================== $cw_search_border_color = !empty($config['cw_search_border_color']) ? $storage->get($config['cw_search_border_color']) : ''; // Indents ================= $cw_search_paddings = !empty($config['cw_search_paddings']) ? $formatter->css_spacing($config['cw_search_paddings']) : ''; $cw_search_margins = !empty($config['cw_search_margins']) ? $formatter->css_spacing($config['cw_search_margins']) : ''; // Border ================== $cw_search_border_style = !empty($config['cw_search_border_style']) ? $config['cw_search_border_style'] : 'none'; $cw_search_border_model = !empty($config['cw_search_border_model']) ? $formatter->css_spacing($config['cw_search_border_model']) : ''; $cw_search_border_radius = !empty($config['cw_search_border_radius']) ? $formatter->css_spacing($config['cw_search_border_radius']) : ''; // Backgroud =============== $cw_search_bg = !empty($config['cw_search_bg']) ? $config['cw_search_bg'] : ''; $cw_search_bg = $formatter->from_bg($cw_search_bg); // Shadow ================== $cw_search_bs_hl = !empty($config['cw_search_bs_hl']) ? $formatter->css_scalar($config['cw_search_bs_hl']) : '0'; $cw_search_bs_vl = !empty($config['cw_search_bs_vl']) ? $formatter->css_scalar($config['cw_search_bs_vl']) : '0'; $cw_search_bs_br = !empty($config['cw_search_bs_br']) ? $formatter->css_scalar($config['cw_search_bs_br']) : '0'; $cw_search_bs_sr = !empty($config['cw_search_bs_sr']) ? $formatter->css_scalar($config['cw_search_bs_sr']) : '0'; $cw_search_bs_color = !empty($config['cw_search_bs_color']) ? $storage->get($config['cw_search_bs_color']) : 'transparent'; $cw_search_bs = " box-shadow: {$cw_search_bs_hl} {$cw_search_bs_vl} {$cw_search_bs_br} {$cw_search_bs_sr} {$cw_search_bs_color}; "; echo ' '.$class_name.'.widget { padding: '.$cw_search_paddings.'; margin: '.$cw_search_margins.'; border-color: '.$cw_search_border_color.'; border-style: '.$cw_search_border_style.'; border-width: '.$cw_search_border_model.'; border-radius: '.$cw_search_border_radius.'; '.$cw_search_bs.' } '.$class_name.' > .background > .image-layer { background-image: url("'.$cw_search_bg['image'].'"); } '.$class_name.' > .background > .color-layer { background-color: '.$cw_search_bg['color'].'; } '.$class_name.' > .background > .gradient-layer { '.$cw_search_bg['gradient'].'; } ';