formatter(); $storage = $wpw->storage(); unset($wpw); $class_name = !empty($config['class_name']) ? '.' . $config['class_name'] : '.list-unordered-primary'; if ($class_name == '.list-unordered-primary') { $config['list_wrapper_type'] = 'ul'; } elseif ($class_name == '.list-ordered-primary') { $config['list_wrapper_type'] = 'ol'; } /** * Wrapper */ // General ================== $list_wrapper_type = !empty($config['list_wrapper_type']) ? $config['list_wrapper_type'] : 'ul'; // Color ==================== $list_wrapper_bg_color = !empty($config['list_wrapper_bg_color']) ? $storage->get($config['list_wrapper_bg_color']) : ''; $list_wrapper_border_color = !empty($conifg['list_wrapper_border_color']) ? $storage->get($conifg['list_wrapper_border_color']) : ''; // Typogaphy ================ $list_wrapper_typography = !empty($config['list_wrapper_typography']) ? $config['list_wrapper_typography'] : 'main'; $list_wrapper_typography = $formatter->dynamic_typography($list_wrapper_typography, $class_name . ' ' . $list_wrapper_type.' li, '.$list_wrapper_type.$class_name.' li, li '.$list_wrapper_type.$class_name.' li, li ' . $class_name . ' ' . $list_wrapper_type.' li'); // Indents ================== $list_wrapper_paddings = !empty($config['list_wrapper_paddings']) ? $formatter->css_spacing($config['list_wrapper_paddings']) : ''; $list_wrapper_margins = !empty($config['list_wrapper_margins']) ? $formatter->css_spacing($config['list_wrapper_margins']) : ''; // Border =================== $list_wrapper_border_style = !empty($config['list_wrapper_border_style']) ? $config['list_wrapper_border_style'] : 'none'; $list_wrapper_border_model = !empty($config['list_wrapper_border_model']) ? $formatter->css_spacing($config['list_wrapper_border_model']) : ''; $list_wrapper_border_radius = !empty($config['list_wrapper_border_radius']) ? $formatter->css_spacing($config['list_wrapper_border_radius']) : ''; // Shadow =================== $list_wrapper_bs_hl = !empty($config['list_wrapper_bs_hl']) ? $formatter->css_scalar($config['list_wrapper_bs_hl']) : '0'; $list_wrapper_bs_vl = !empty($config['list_wrapper_bs_vl']) ? $formatter->css_scalar($config['list_wrapper_bs_vl']) : '0'; $list_wrapper_bs_br = !empty($config['list_wrapper_bs_br']) ? $formatter->css_scalar($config['list_wrapper_bs_br']) : '0'; $list_wrapper_bs_sr = !empty($config['list_wrapper_bs_sr']) ? $formatter->css_scalar($config['list_wrapper_bs_sr']) : '0'; $list_wrapper_bs_color = !empty($config['list_wrapper_bs_color']) ? $storage->get($config['list_wrapper_bs_color']) : 'transparent'; $list_wrapper_bs = " box-shadow: {$list_wrapper_bs_hl} {$list_wrapper_bs_vl} {$list_wrapper_bs_br} {$list_wrapper_bs_sr} {$list_wrapper_bs_color}; "; /** * List item */ // General ===================== $list_item_marker = !empty($config['list_item_marker']) ? $config['list_item_marker'] : ''; // Typography ================== $list_item_text_align = !empty($config['list_item_text_align']) ? $config['list_item_text_align'] : 'left'; // Color ======================= $list_item_text_color = !empty($config['list_item_text_color']) ? $storage->get($config['list_item_text_color']) : ''; $list_item_bg_color = !empty($config['list_item_bg_color']) ? $storage->get($config['list_item_bg_color']) : ''; $list_item_border_color = !empty($config['list_item_border_color']) ? $storage->get($config['list_item_border_color']) : ''; // indents ==================== $list_item_paddings = !empty($config['list_item_paddings']) ? $formatter->css_spacing($config['list_item_paddings']) : ''; $list_item_margins = !empty($config['list_item_margins']) ? $formatter->css_spacing($config['list_item_margins']) : ''; // Border ===================== $list_item_border_style = !empty($config['list_item_border_style']) ? $config['list_item_border_style'] : 'none'; $list_item_border_model = !empty($config['list_item_border_model']) ? $formatter->css_spacing($config['list_item_border_model']) : ''; $list_item_border_radius = !empty($config['list_item_border_radius']) ? $formatter->css_spacing($config['list_item_border_radius']) : ''; // Shadow ====================== $list_item_bs_hl = !empty($config['list_item_bs_hl']) ? $formatter->css_scalar($config['list_item_bs_hl']) : '0'; $list_item_bs_vl = !empty($config['list_item_bs_vl']) ? $formatter->css_scalar($config['list_item_bs_vl']) : '0'; $list_item_bs_br = !empty($config['list_item_bs_br']) ? $formatter->css_scalar($config['list_item_bs_br']) : '0'; $list_item_bs_sr = !empty($config['list_item_bs_sr']) ? $formatter->css_scalar($config['list_item_bs_sr']) : '0'; $list_item_bs_color = !empty($config['list_item_bs_color']) ? $storage->get($config['list_item_bs_color']) : 'transparent'; $list_item_bs = " box-shadow: {$list_item_bs_hl} {$list_item_bs_vl} {$list_item_bs_br} {$list_item_bs_sr} {$list_item_bs_color}; "; /** * Sublist */ $list_sub_wrapper_paddings = !empty($config['list_sub_wrapper_paddings']) ? $formatter->css_spacing($config['list_sub_wrapper_paddings']) : ''; $list_sub_wrapper_margins = !empty($config['list_sub_wrapper_margins']) ? $formatter->css_spacing($config['list_sub_wrapper_margins']) : ''; /** * Before */ // General ======================== $list_item_before_display = !empty($config['list_item_before_display']) ? $config['list_item_before_display'] : 'none'; $list_item_before_position = !empty($config['list_item_before_position']) ? $config['list_item_before_position'] : 'relative'; // Content ======================== $list_item_before_content = !empty($config['list_item_before_content']) ? $config['list_item_before_content'] : 'none'; $list_item_before_content_text = !empty($config['list_item_before_content_text']) ? $config['list_item_before_content_text'] : ''; if ($list_item_before_content == 'none') { $list_item_before_content_text = 'none'; } elseif ($list_item_before_content == 'counter') { $list_item_before_content_text = 'counter(cntr)'; } else { $list_item_before_content_text = '"' . $list_item_before_content_text . '"'; } // Typography =============== $list_item_before_typography = !empty($config['list_item_before_typography']) ? $config['list_item_before_typography'] : 'main'; $list_item_before_typography = $formatter->dynamic_typography($list_item_before_typography, $list_wrapper_type.$class_name.' li::before, '.$class_name.' '.$list_wrapper_type.' li::before'); // Color ========================== $list_item_before_border_color = !empty($config['list_item_before_border_color']) ? $storage->get($config['list_item_before_border_color']) : ''; $list_item_before_text_color = !empty($config['list_item_before_text_color']) ? $storage->get($config['list_item_before_text_color']) : ''; // Position ======================= $list_item_before_top = !empty($config['list_item_before_top']) ? $formatter->css_input($config['list_item_before_top']) : ''; $list_item_before_left = !empty($config['list_item_before_left']) ? $formatter->css_input($config['list_item_before_left']) : ''; $list_item_before_zindex = !empty($config['list_item_before_zindex']) ? intval($config['list_item_before_zindex']) : ''; // dimension ====================== $list_item_before_height = !empty($config['list_item_before_height']) ? $formatter->css_input($config['list_item_before_height']) : ''; $list_item_before_width = !empty($config['list_item_before_width']) ? $formatter->css_input($config['list_item_before_width']) : ''; // Indents ======================== $list_item_before_paddings = !empty($config['list_item_before_paddings']) ? $formatter->css_spacing($config['list_item_before_paddings']) : ''; $list_item_before_margins = !empty($config['list_item_before_margins']) ? $formatter->css_spacing($config['list_item_before_margins']) : ''; // Border ========================= $list_item_before_border_style = !empty($config['list_item_before_border_style']) ? $config['list_item_before_border_style'] : 'none'; $list_item_before_border_model = !empty($config['list_item_before_border_model']) ? $formatter->css_spacing($config['list_item_before_border_model']) : ''; $list_item_before_border_radius = !empty($config['list_item_before_border_radius']) ? $formatter->css_spacing($config['list_item_before_border_radius']) : ''; // Background ===================== $list_item_before_bg = !empty($config['list_item_before_bg']) ? $config['list_item_before_bg'] : ''; $list_item_before_bg = $formatter->from_bg($list_item_before_bg); // Shadow ========================= $list_item_before_bs_hl = !empty($config['list_item_before_bs_hl']) ? $formatter->css_scalar($config['list_item_before_bs_hl']) : '0'; $list_item_before_bs_vl = !empty($config['list_item_before_bs_vl']) ? $formatter->css_scalar($config['list_item_before_bs_vl']) : '0'; $list_item_before_bs_br = !empty($config['list_item_before_bs_br']) ? $formatter->css_scalar($config['list_item_before_bs_br']) : '0'; $list_item_before_bs_sr = !empty($config['list_item_before_bs_sr']) ? $formatter->css_scalar($config['list_item_before_bs_sr']) : '0'; $list_item_before_bs_color = !empty($config['list_item_before_bs_color']) ? $storage->get($config['list_item_before_bs_color']) : 'transparent'; $list_item_before_bs = " box-shadow: {$list_item_before_bs_hl} {$list_item_before_bs_vl} {$list_item_before_bs_br} {$list_item_before_bs_sr} {$list_item_before_bs_color}; "; echo ' '.$list_wrapper_typography.' '.$class_name.' li '.$list_wrapper_type.', li '.$class_name.' li '.$list_wrapper_type.' { padding: '.$list_sub_wrapper_paddings.'; margin: '.$list_sub_wrapper_margins.'; } '.$list_wrapper_type.$class_name.', li '.$list_wrapper_type.$class_name.', '.$class_name.' '.$list_wrapper_type.', li '.$class_name.' '.$list_wrapper_type.' { background-color: '.$list_wrapper_bg_color.'; border-color: '.$list_wrapper_border_color.'; padding: '.$list_wrapper_paddings.'; margin: '.$list_wrapper_margins.'; border-style: '.$list_wrapper_border_style.'; border-width: '.$list_wrapper_border_model.'; border-radius: '.$list_wrapper_border_radius.'; '.$list_wrapper_bs.' } '.$list_wrapper_type.$class_name.' li, li '.$list_wrapper_type.$class_name.' li, '.$class_name.' '.$list_wrapper_type.' li, li '.$class_name.' '.$list_wrapper_type.' li { text-align: '.$list_item_text_align.'; list-style-type: '.$list_item_marker.'; color: '.$list_item_text_color.'; background-color: '.$list_item_bg_color.'; border-color: '.$list_item_border_color.'; padding: '.$list_item_paddings.'; margin: '.$list_item_margins.'; border-style: '.$list_item_border_style.'; border-width: '.$list_item_border_model.'; border-radius: '.$list_item_border_radius.'; '.$list_item_bs.' } '.$list_wrapper_type.$class_name.', '.$class_name.' '.$list_wrapper_type.' { counter-reset: cntr; } '.$list_item_before_typography.' '.$list_wrapper_type.$class_name.' li::before, li '.$list_wrapper_type.$class_name.' li::before, '.$class_name.' '.$list_wrapper_type.' li::before, li '.$class_name.' '.$list_wrapper_type.' li::before { counter-increment: cntr; display: '.$list_item_before_display.'; position: '.$list_item_before_position.'; content: '.$list_item_before_content_text.'; color: '.$list_item_before_text_color.'; height: '.$list_item_before_height.'; width: '.$list_item_before_width.'; top: '.$list_item_before_top.'; left: '.$list_item_before_left.'; z-index: '.$list_item_before_zindex.'; padding: '.$list_item_before_paddings.'; margin: '.$list_item_before_margins.'; border-color: '.$list_item_before_border_color.'; border-style: '.$list_item_before_border_style.'; border-width: '.$list_item_before_border_model.'; border-radius: '.$list_item_before_border_radius.'; '.$list_item_before_bg['fill'].' background-image: url("'.$list_item_before_bg['image'].'"); '.$list_item_before_bs.' } ';