formatter(); $main_config = get_theme_mod('wpw_mainfooter_element'); $main_config = !empty($main_config) ? json_decode(urldecode($main_config), true) : []; $widget_config = get_theme_mod('wpw_widgetfooter_element'); $widget_config = !empty($widget_config) ? json_decode(urldecode($widget_config), true) : []; // accent color $accent_color = get_theme_mod('wpw_accent_colors'); $accent_color = json_decode(urldecode($accent_color), true); $accent_color = (isset($accent_color[0]) && !empty($accent_color[0])) ? $accent_color[0] : 'rgb(25, 87, 243)'; // accent color $secondary_color = get_theme_mod('wpw_secondary_text_color'); $secondary_color = json_decode(urldecode($secondary_color), true); $secondary_color = (isset($secondary_color[0]) && !empty($secondary_color[0])) ? $secondary_color[0] : 'rgb(0,0,0,.6)'; // container type $lg_container_type = get_theme_mod('wpw_container_type', 'container-fluid'); $md_container_type = get_theme_mod('wpw_middle_container_type', 'container-fluid'); $sm_container_type = get_theme_mod('wpw_small_container_type', 'container-fluid'); // container width $md_container_width = get_theme_mod('wpw_middle_max_width'); $sm_container_width = get_theme_mod('wpw_small_max_width'); $lg_container_width = get_theme_mod('wpw_max_width'); //********************************* defaults ***********************************// $default_width = [ 'number' => 100, 'unit' => '%', ]; $default_height = [ 'number' => 120, 'unit' => 'px', ]; $default_indents = [ 'top' => [ 'number' => 20, ], 'bottom' => [ 'number' => 20, ], ]; //**************************** main footer ***********************************// // text $text_color = (isset($main_config['wpw_footer_text_color']) && !empty($main_config['wpw_footer_text_color'])) ? $main_config['wpw_footer_text_color'] : ''; $text_color = Wpw::inst()->storage()->get($text_color); $links_color = (isset($main_config['wpw_footer_links_color']) && !empty($main_config['wpw_footer_links_color'])) ? $main_config['wpw_footer_links_color'] : ''; $links_color = Wpw::inst()->storage()->get($links_color); $links_hover = (isset($main_config['wpw_footer_links_color_hover']) && !empty($main_config['wpw_footer_links_color_hover'])) ? $main_config['wpw_footer_links_color_hover'] : ''; $links_hover = Wpw::inst()->storage()->get($links_hover); $mainfooter_text_align = (isset($main_config['mainfooter_text_align']) && !empty($main_config['mainfooter_text_align'])) ? $main_config['mainfooter_text_align'] : 'left'; $mainfooter_text_typography = (isset($main_config['mainfooter_text_typography']) && !empty($main_config['mainfooter_text_typography'])) ? $main_config['mainfooter_text_typography'] : 'main'; $mainfooter_text_typography = $formatter->dynamic_typography($mainfooter_text_typography, '.main-footer .footer-main__content, body .wpw .footer-main .footer-main__content a'); // links $mainfooter_links_padding = (isset($main_config['mainfooter_links_padding']) && !empty($main_config['mainfooter_links_padding'])) ? $main_config['mainfooter_links_padding'] : null; $mainfooter_links_padding = $formatter->css_spacing($mainfooter_links_padding); $mainfooter_links_margin = (isset($main_config['mainfooter_links_margin']) && !empty($main_config['mainfooter_links_margin'])) ? $main_config['mainfooter_links_margin'] : null; $mainfooter_links_margin = $formatter->css_spacing($mainfooter_links_margin, [ 'right' => [ 'number' => 12, ], 'left' => [ 'number' => 12, ], ]); $mainfooter_links_align = (isset($main_config['mainfooter_links_align']) && !empty($main_config['mainfooter_links_align'])) ? $main_config['mainfooter_links_align'] : 'flex-end'; $mainfooter_links_hover_border_style = (isset($main_config['mainfooter_links_hover_border_style']) && !empty($main_config['mainfooter_links_hover_border_style'])) ? $main_config['mainfooter_links_hover_border_style'] : null; $mainfooter_links_hover_border_model = (isset($main_config['mainfooter_links_hover_mainfooter_border_model']) && !empty($main_config['mainfooter_links_hover_mainfooter_border_model'])) ? $main_config['mainfooter_links_hover_mainfooter_border_model'] : null; $mainfooter_links_hover_border_color = (isset($main_config['mainfooter_links_hover_border_color']) && !empty($main_config['mainfooter_links_hover_border_color'])) ? $main_config['mainfooter_links_hover_border_color'] : null; $mainfooter_links_hover_border_color = Wpw::inst()->storage()->get($mainfooter_links_hover_border_color); $mainfooter_links_hover_border = $formatter->css_border($mainfooter_links_hover_border_style, $mainfooter_links_hover_border_model, $mainfooter_links_hover_border_color); $mainfooter_links_hover_border_radius = (isset($main_config['mainfooter_links_hover_border_radius']) && !empty($main_config['mainfooter_links_hover_border_radius'])) ? $main_config['mainfooter_links_hover_border_radius'] : null; $mainfooter_links_hover_border_radius = $formatter->css_spacing($mainfooter_links_hover_border_radius, [ 'top' => [ 'number' => 50, 'units' => '%', ], 'bottom' => [ 'number' => 50, 'units' => '%', ], 'right' => [ 'number' => 50, 'units' => '%', ], 'left' => [ 'number' => 50, 'units' => '%', ], ]); $mainfooter_links_hover_bg = (isset($main_config['mainfooter_links_hover_bg_color']) && !empty($main_config['mainfooter_links_hover_bg_color'])) ? $main_config['mainfooter_links_hover_bg_color'] : ''; $mainfooter_links_hover_bg = Wpw::inst()->storage()->get($mainfooter_links_hover_bg); $mainfooter_links_hover_fg = (isset($main_config['mainfooter_links_hover_fg_color']) && !empty($main_config['mainfooter_links_hover_fg_color'])) ? $main_config['mainfooter_links_hover_fg_color'] : ''; $mainfooter_links_hover_fg = Wpw::inst()->storage()->get($mainfooter_links_hover_fg); $mainfooter_links_border_style = (isset($main_config['mainfooter_links_border_style']) && !empty($main_config['mainfooter_links_border_style'])) ? $main_config['mainfooter_links_border_style'] : null; $mainfooter_links_border_model = (isset($main_config['mainfooter_links_mainfooter_border_model']) && !empty($main_config['mainfooter_links_mainfooter_border_model'])) ? $main_config['mainfooter_links_mainfooter_border_model'] : null; $mainfooter_links_border_color = (isset($main_config['mainfooter_links_border_color']) && !empty($main_config['mainfooter_links_border_color'])) ? $main_config['mainfooter_links_border_color'] : null; $mainfooter_links_border_color = Wpw::inst()->storage()->get($mainfooter_links_border_color); $mainfooter_links_border = $formatter->css_border($mainfooter_links_border_style, $mainfooter_links_border_model, $mainfooter_links_border_color); $mainfooter_links_border_radius = (isset($main_config['mainfooter_links_border_radius']) && !empty($main_config['mainfooter_links_border_radius'])) ? $main_config['mainfooter_links_border_radius'] : null; $mainfooter_links_border_radius = $formatter->css_spacing($mainfooter_links_border_radius, [ 'top' => [ 'number' => 50, 'units' => '%', ], 'bottom' => [ 'number' => 50, 'units' => '%', ], 'right' => [ 'number' => 50, 'units' => '%', ], 'left' => [ 'number' => 50, 'units' => '%', ], ]); $mainfooter_links_bg = (isset($main_config['mainfooter_links_bg_color']) && !empty($main_config['mainfooter_links_bg_color'])) ? $main_config['mainfooter_links_bg_color'] : ''; $mainfooter_links_bg = Wpw::inst()->storage()->get($mainfooter_links_bg); $mainfooter_links_fg = (isset($main_config['mainfooter_links_fg_color']) && !empty($main_config['mainfooter_links_fg_color'])) ? $main_config['mainfooter_links_fg_color'] : ''; $mainfooter_links_fg = Wpw::inst()->storage()->get($mainfooter_links_fg); //--------------------------- desktop ----------------------------------------------// // width $width_type = (isset($main_config['mainfooter_layout']) && !empty($main_config['mainfooter_layout'])) ? $main_config['mainfooter_layout'] : 'full'; $width = (isset($main_config['_mainfooter_width']) && !empty($main_config['_mainfooter_width'])) ? $main_config['_mainfooter_width'] : null; if ($width_type == 'full') { $width = $default_width; } elseif ($width_type == 'container') { $width = $lg_container_width; } $width = $formatter->css_scalar($width, $default_width); $mainfooter_alignment = (isset($main_config['mainfooter_alignment']) && !empty($main_config['mainfooter_alignment'])) ? $main_config['mainfooter_alignment'] : null; if ($mainfooter_alignment == 'left') { $mainfooter_alignment = 'margin-left: 0'; } elseif ($mainfooter_alignment == 'right') { $mainfooter_alignment = 'margin-right: 0;'; } // out indents $out_indents = (isset($main_config['mainfooter_outer_indent']) && !empty($main_config['mainfooter_outer_indent'])) ? $main_config['mainfooter_outer_indent'] : null; $out_indents = $formatter->css_spacing($out_indents); // border $border_style = (isset($main_config['mainfooter_border']) && !empty($main_config['mainfooter_border'])) ? $main_config['mainfooter_border'] : 'none'; $border_model = (isset($main_config['mainfooter_border_model']) && !empty($main_config['mainfooter_border_model'])) ? $main_config['mainfooter_border_model'] : null; $border_color = (isset($main_config['mainfooter_border_color']) && !empty($main_config['mainfooter_border_color'])) ? $main_config['mainfooter_border_color'] : null; $border_color = Wpw::inst()->storage()->get($border_color); $border = $formatter->css_border($border_style, $border_model, $border_color); // radius $border_radius = (isset($main_config['mainfooter_border_radius']) && !empty($main_config['mainfooter_border_radius'])) ? $main_config['mainfooter_border_radius'] : null; $border_radius = $formatter->css_spacing($border_radius); // container width type $container_width_type = (isset($main_config['container_mainfooter_width_type']) && !empty($main_config['container_mainfooter_width_type'])) ? $main_config['container_mainfooter_width_type'] : 'full'; $container_width = (isset($main_config['container_mainfooter_width']) && !empty($main_config['container_mainfooter_width'])) ? $main_config['container_mainfooter_width'] : null; if ($container_width_type == 'full') { $container_width = $default_width; } elseif ($container_width_type == 'container') { $container_width = $width_type == $container_width_type ? $default_width : $lg_container_width; } $container_width = $formatter->css_scalar($container_width, $default_width); // inner indents $inner_indents = (isset($main_config['mainfooter_inner_indent']) && !empty($main_config['mainfooter_inner_indent'])) ? $main_config['mainfooter_inner_indent'] : null; $inner_indents = $formatter->css_spacing($inner_indents, $default_indents); $mainfooter_content_alignment = (isset($main_config['mainfooter_content_alignment']) && !empty($main_config['mainfooter_content_alignment'])) ? $main_config['mainfooter_content_alignment'] : null; if ($mainfooter_content_alignment == 'left') { $mainfooter_content_alignment = 'margin-left: 0'; } elseif ($mainfooter_content_alignment == 'right') { $mainfooter_content_alignment = 'margin-right: 0;'; } //--------------------------- tablet ----------------------------------------------// // width $middle_width_type = (isset($main_config['middle_mainfooter_layout']) && !empty($main_config['middle_mainfooter_layout'])) ? $main_config['middle_mainfooter_layout'] : 'full'; $middle_width = (isset($main_config['middle_mainfooter_width']) && !empty($main_config['middle_mainfooter_width'])) ? $main_config['middle_mainfooter_width'] : null; if ($middle_width_type == 'full') { $middle_width = $default_width; } elseif ($middle_width_type == 'container') { $middle_width = $md_container_width; } $middle_width = $formatter->css_scalar($middle_width, $default_width); $middle_mainfooter_alignment = (isset($main_config['middle_mainfooter_alignment']) && !empty($main_config['middle_mainfooter_alignment'])) ? $main_config['middle_mainfooter_alignment'] : null; if ($middle_mainfooter_alignment == 'left') { $middle_mainfooter_alignment = 'margin-left: 0'; } elseif ($middle_mainfooter_alignment == 'right') { $middle_mainfooter_alignment = 'margin-right: 0;'; } // out indents $middle_out_indents = (isset($main_config['middle_mainfooter_outer_indent']) && !empty($main_config['middle_mainfooter_outer_indent'])) ? $main_config['middle_mainfooter_outer_indent'] : null; $middle_out_indents = $formatter->css_spacing($middle_out_indents); // border $middle_border_style = (isset($main_config['middle_mainfooter_border']) && !empty($main_config['middle_mainfooter_border'])) ? $main_config['middle_mainfooter_border'] : 'none'; $middle_border_model = (isset($main_config['middle_mainfooter_border_model']) && !empty($main_config['middle_mainfooter_border_model'])) ? $main_config['middle_mainfooter_border_model'] : null; $middle_border_color = (isset($main_config['middle_mainfooter_border_color']) && !empty($main_config['middle_mainfooter_border_color'])) ? $main_config['middle_mainfooter_border_color'] : null; $middle_border_color = Wpw::inst()->storage()->get($middle_border_color); $middle_border = $formatter->css_border($middle_border_style, $middle_border_model, $middle_border_color); // radius $middle_border_radius = (isset($main_config['middle_mainfooter_border_radius']) && !empty($main_config['middle_mainfooter_border_radius'])) ? $main_config['middle_mainfooter_border_radius'] : null; $middle_border_radius = $formatter->css_spacing($middle_border_radius); // container width type $middle_container_width_type = (isset($main_config['middle_container_mainfooter_width_type']) && !empty($main_config['middle_container_mainfooter_width_type'])) ? $main_config['middle_container_mainfooter_width_type'] : 'full'; $middle_container_width = (isset($main_config['middle_container_mainfooter_width']) && !empty($main_config['middle_container_mainfooter_width'])) ? $main_config['middle_container_mainfooter_width'] : null; if ($middle_container_width_type == 'full') { $middle_container_width = $default_width; } elseif ($middle_container_width_type == 'container') { $middle_container_width = $middle_width_type == $container_width_type ? $default_width : $md_container_width; } $middle_container_width = $formatter->css_scalar($middle_container_width, $default_width); // inner indents $middle_inner_indents = (isset($main_config['middle_mainfooter_inner_indent']) && !empty($main_config['middle_mainfooter_inner_indent'])) ? $main_config['middle_mainfooter_inner_indent'] : null; $middle_inner_indents = $formatter->css_spacing($middle_inner_indents, $default_indents); $middle_mainfooter_content_alignment = (isset($main_config['middle_mainfooter_content_alignment']) && !empty($main_config['middle_mainfooter_content_alignment'])) ? $main_config['middle_mainfooter_content_alignment'] : null; if ($middle_mainfooter_content_alignment == 'left') { $middle_mainfooter_content_alignment = 'margin-left: 0'; } elseif ($middle_mainfooter_content_alignment == 'right') { $middle_mainfooter_content_alignment = 'margin-right: 0;'; } //--------------------------- mobile ----------------------------------------------// // width $small_width_type = (isset($main_config['small_mainfooter_layout']) && !empty($main_config['small_mainfooter_layout'])) ? $main_config['small_mainfooter_layout'] : 'full'; $small_width = (isset($main_config['small_mainfooter_width']) && !empty($main_config['small_mainfooter_width'])) ? $main_config['small_mainfooter_width'] : null; if ($small_width_type == 'full') { $small_width = $default_width; } elseif ($small_width_type == 'container') { $small_width = $sm_container_width; } $small_width = $formatter->css_scalar($small_width, $default_width); $small_mainfooter_alignment = (isset($main_config['small_mainfooter_alignment']) && !empty($main_config['small_mainfooter_alignment'])) ? $main_config['small_mainfooter_alignment'] : null; if ($small_mainfooter_alignment == 'left') { $small_mainfooter_alignment = 'margin-left: 0'; } elseif ($small_mainfooter_alignment == 'right') { $small_mainfooter_alignment = 'margin-right: 0;'; } // out indents $small_out_indents = (isset($main_config['small_mainfooter_outer_indent']) && !empty($main_config['small_mainfooter_outer_indent'])) ? $main_config['small_mainfooter_outer_indent'] : null; $small_out_indents = $formatter->css_spacing($small_out_indents); // border $small_border_style = (isset($main_config['small_mainfooter_border']) && !empty($main_config['small_mainfooter_border'])) ? $main_config['small_mainfooter_border'] : 'none'; $small_border_model = (isset($main_config['small_mainfooter_border_model']) && !empty($main_config['small_mainfooter_border_model'])) ? $main_config['small_mainfooter_border_model'] : null; $small_border_color = (isset($main_config['small_mainfooter_border_color']) && !empty($main_config['small_mainfooter_border_color'])) ? $main_config['small_mainfooter_border_color'] : null; $small_border_color = Wpw::inst()->storage()->get($small_border_color); $small_border = $formatter->css_border($small_border_style, $small_border_model, $small_border_color); // radius $small_border_radius = (isset($main_config['small_mainfooter_border_radius']) && !empty($main_config['small_mainfooter_border_radius'])) ? $main_config['small_mainfooter_border_radius'] : null; $small_border_radius = $formatter->css_spacing($small_border_radius); // container width type $small_container_width_type = (isset($main_config['small_container_mainfooter_width_type']) && !empty($main_config['small_container_mainfooter_width_type'])) ? $main_config['small_container_mainfooter_width_type'] : 'full'; $small_container_width = (isset($main_config['small_container_mainfooter_width']) && !empty($main_config['small_container_mainfooter_width'])) ? $main_config['small_container_mainfooter_width'] : null; if ($small_container_width_type == 'full') { $small_container_width_type = $default_width; } elseif ($small_container_width_type == 'container') { $small_container_width = $small_width_type == $small_container_width_type ? $default_width : $sm_container_width; } $small_container_width = $formatter->css_scalar($small_container_width, $default_width); // inner indents $small_inner_indents = (isset($main_config['small_mainfooter_inner_indent']) && !empty($main_config['small_mainfooter_inner_indent'])) ? $main_config['small_mainfooter_inner_indent'] : null; $small_inner_indents = $formatter->css_spacing($small_inner_indents, $default_indents); $small_mainfooter_content_alignment = (isset($main_config['small_mainfooter_content_alignment']) && !empty($main_config['small_mainfooter_content_alignment'])) ? $main_config['small_mainfooter_content_alignment'] : null; if ($small_mainfooter_content_alignment == 'left') { $small_mainfooter_content_alignment = 'margin-left: 0'; } elseif ($small_mainfooter_content_alignment == 'right') { $small_mainfooter_content_alignment = 'margin-right: 0;'; } //------------------------------ bg -----------------------------------------------// $_bg = (isset($main_config['mainfooter_background']) && !empty($main_config['mainfooter_background'])) ? $main_config['mainfooter_background'] : null; $bg = $formatter->from_bg($_bg); //------------------------------ typo -----------------------------------------------// $mainfooter_links_type = !empty($main_config['mainfooter_links_type']) ? $main_config['mainfooter_links_type'] : 'icons'; $mainfooter_links_typography = !empty($main_config['mainfooter_links_typography']) ? $formatter->dynamic_typography($main_config['mainfooter_links_typography'], '.main-footer .footer-main__content a, .main-footer .footer-main__content a ') : ''; /** ************************** widget footer ********************************** **/ $widgets_text_color = (isset($widget_config['wpw_footer_widgets_text_color']) && !empty($widget_config['wpw_footer_widgets_text_color'])) ? $widget_config['wpw_footer_widgets_text_color'] : ''; $widgets_text_color = Wpw::inst()->storage()->get($widgets_text_color); $widgets_links_color = (isset($widget_config['wpw_footer_widgets_links_colo']) && !empty($widget_config['wpw_footer_widgets_links_colo'])) ? $widget_config['wpw_footer_widgets_links_colo'] : ''; $widgets_links_color = Wpw::inst()->storage()->get($widgets_links_color); $widgets_links_hover = (isset($widget_config['wpw_footer_widgets_links_color_hover']) && !empty($widget_config['wpw_footer_widgets_links_color_hover'])) ? $widget_config['wpw_footer_widgets_links_color_hover'] : ''; $widgets_links_hover = Wpw::inst()->storage()->get($widgets_links_hover); //--------------------------- desktop ----------------------------------------------// // width $widget_width_type = (isset($widget_config['widgets_layout']) && !empty($widget_config['widgets_layout'])) ? $widget_config['widgets_layout'] : 'full'; $widget_width = (isset($widget_config['widgets__width']) && !empty($widget_config['widgets__width'])) ? $widget_config['widgets__width'] : null; if ($widget_width_type == 'full') { $widget_width = $default_width; } elseif ($widget_width_type == 'container') { $widget_width = $lg_container_width; } $widget_width = $formatter->css_scalar($widget_width, $default_width); $widgetfooter_alignment = (isset($widget_config['widgetfooter_alignment']) && !empty($widget_config['widgetfooter_alignment'])) ? $widget_config['widgetfooter_alignment'] : null; if ($widgetfooter_alignment == 'left') { $widgetfooter_alignment = 'margin-left: 0'; } elseif ($widgetfooter_alignment == 'right') { $widgetfooter_alignment = 'margin-right: 0;'; } // out indents $widget_out_indents = (isset($widget_config['widgets_outer_indent']) && !empty($widget_config['widgets_outer_indent'])) ? $widget_config['widgets_outer_indent'] : null; $widget_out_indents = $formatter->css_spacing($widget_out_indents); // border $widget_border_style = (isset($widget_config['widgets_border']) && !empty($widget_config['widgets_border'])) ? $widget_config['widgets_border'] : 'none'; $widget_border_model = (isset($widget_config['widgets_border_model']) && !empty($widget_config['widgets_border_model'])) ? $widget_config['widgets_border_model'] : null; $widget_border_color = (isset($widget_config['widgets_border_color']) && !empty($widget_config['widgets_border_color'])) ? $widget_config['widgets_border_color'] : null; $widget_border_color = Wpw::inst()->storage()->get($widget_border_color); $widget_border = $formatter->css_border($widget_border_style, $widget_border_model, $widget_border_color); // radius $widget_border_radius = (isset($widget_config['widgets_border_radius']) && !empty($widget_config['widgets_border_radius'])) ? $widget_config['widgets_border_radius'] : null; $widget_border_radius = $formatter->css_spacing($widget_border_radius); // container width type $widget_container_width_type = (isset($widget_config['widgets_container_width_type']) && !empty($widget_config['widgets_container_width_type'])) ? $widget_config['widgets_container_width_type'] : 'full'; $widget_container_width = (isset($widget_config['widgets_container_width']) && !empty($widget_config['widgets_container_width'])) ? $widget_config['widgets_container_width'] : null; if ($widget_container_width_type == 'full') { $widget_container_width = $default_width; } elseif ($widget_container_width_type == 'container') { $widget_container_width = $widget_width_type == $widget_container_width_type ? $default_width : $lg_container_width; } $widget_container_width = $formatter->css_scalar($widget_container_width, $default_width); // inner indents $widget_inner_indents = (isset($widget_config['widgets_inner_indent']) && !empty($widget_config['widgets_inner_indent'])) ? $widget_config['widgets_inner_indent'] : null; $widget_inner_indents = $formatter->css_spacing($widget_inner_indents, $default_indents); $widgetfooter_content_alignment = (isset($widget_config['widgetfooter_content_alignment']) && !empty($widget_config['widgetfooter_content_alignment'])) ? $widget_config['widgetfooter_content_alignment'] : null; if ($widgetfooter_content_alignment == 'left') { $widgetfooter_content_alignment = 'margin-left: 0'; } elseif ($widgetfooter_content_alignment == 'right') { $widgetfooter_content_alignment = 'margin-right: 0;'; } //--------------------------- tablet ----------------------------------------------// // width $widget_middle_width_type = (isset($widget_config['widgets_middle_layout']) && !empty($widget_config['widgets_middle_layout'])) ? $widget_config['widgets_middle_layout'] : 'full'; $widget_middle_width = (isset($widget_config['widgets_middle_width']) && !empty($widget_config['widgets_middle_width'])) ? $widget_config['widgets_middle_width'] : null; if ($widget_middle_width_type == 'full') { $widget_middle_width = $default_width; } elseif ($widget_middle_width_type == 'container') { $widget_middle_width = $md_container_width; } $widget_middle_width = $formatter->css_scalar($widget_middle_width, $default_width); $middle_widgetfooter_alignment = (isset($widget_config['middle_widgetfooter_alignment']) && !empty($widget_config['middle_widgetfooter_alignment'])) ? $widget_config['middle_widgetfooter_alignment'] : null; if ($middle_widgetfooter_alignment == 'left') { $middle_widgetfooter_alignment = 'margin-left: 0'; } elseif ($middle_widgetfooter_alignment == 'right') { $middle_widgetfooter_alignment = 'margin-right: 0;'; } // out indents $widget_middle_out_indents = (isset($widget_config['widgets_middle_outer_indent']) && !empty($widget_config['widgets_middle_outer_indent'])) ? $widget_config['widgets_middle_outer_indent'] : null; $widget_middle_out_indents = $formatter->css_spacing($widget_middle_out_indents); // border $widget_middle_border_style = (isset($widget_config['widgets_middle_border']) && !empty($widget_config['widgets_middle_border'])) ? $widget_config['widgets_middle_border'] : 'none'; $widget_middle_border_model = (isset($widget_config['widgets_middle_border_model']) && !empty($widget_config['widgets_middle_border_model'])) ? $widget_config['widgets_middle_border_model'] : null; $widget_middle_border_color = (isset($widget_config['widgets_middle_border_color']) && !empty($widget_config['widgets_middle_border_color'])) ? $widget_config['widgets_middle_border_color'] : null; $widget_middle_border_color = Wpw::inst()->storage()->get($widget_middle_border_color); $widget_middle_border = $formatter->css_border($widget_middle_border_style, $widget_middle_border_model, $widget_middle_border_color); // radius $widget_middle_border_radius = (isset($widget_config['widgets_middle_border_radius']) && !empty($widget_config['widgets_middle_border_radius'])) ? $widget_config['widgets_middle_border_radius'] : null; $widget_middle_border_radius = $formatter->css_spacing($widget_middle_border_radius); // container width type $widget_middle_container_width_type = (isset($widget_config['widgets_middle_container_width_type']) && !empty($widget_config['widgets_middle_container_width_type'])) ? $widget_config['widgets_middle_container_width_type'] : 'full'; $widget_middle_container_width = (isset($widget_config['widgets_middle_container_width']) && !empty($widget_config['widgets_middle_container_width'])) ? $widget_config['widgets_middle_container_width'] : null; if ($widget_middle_container_width_type == 'full') { $widget_middle_container_width = $default_width; } elseif ($widget_middle_container_width_type == 'container') { $widget_middle_container_width = $widget_middle_width_type == $widget_middle_container_width_type ? $default_width : $md_container_width; } $widget_middle_container_width = $formatter->css_scalar($widget_middle_container_width, $default_width); // inner indents $widget_middle_inner_indents = (isset($widget_config['widgets_middle_inner_indent']) && !empty($widget_config['widgets_middle_inner_indent'])) ? $widget_config['widgets_middle_inner_indent'] : null; $widget_middle_inner_indents = $formatter->css_spacing($widget_middle_inner_indents, $default_indents); $middle_widgetfooter_content_alignment = (isset($widget_config['middle_widgetfooter_content_alignment']) && !empty($widget_config['middle_widgetfooter_content_alignment'])) ? $widget_config['middle_widgetfooter_content_alignment'] : null; if ($middle_widgetfooter_content_alignment == 'left') { $middle_widgetfooter_content_alignment = 'margin-left: 0'; } elseif ($middle_widgetfooter_content_alignment == 'right') { $middle_widgetfooter_content_alignment = 'margin-right: 0;'; } //--------------------------- mobile ----------------------------------------------// // width $widget_small_width_type = (isset($widget_config['widgets_small_layout']) && !empty($widget_config['widgets_small_layout'])) ? $widget_config['widgets_small_layout'] : 'full'; $widget_small_width = (isset($widget_config['widgets_small_width']) && !empty($widget_config['widgets_small_width'])) ? $widget_config['widgets_small_width'] : null; if ($widget_small_width_type == 'full') { $widget_small_width = $default_width; } elseif ($widget_small_width_type == 'container') { $widget_small_width = $sm_container_width; } $widget_small_width = $formatter->css_scalar($widget_small_width, $default_width); $small_widgetfooter_alignment = (isset($widget_config['small_widgetfooter_alignment']) && !empty($widget_config['small_widgetfooter_alignment'])) ? $widget_config['small_widgetfooter_alignment'] : null; if ($small_widgetfooter_alignment == 'left') { $small_widgetfooter_alignment = 'margin-left: 0'; } elseif ($small_widgetfooter_alignment == 'right') { $small_widgetfooter_alignment = 'margin-right: 0;'; } // out indents $widget_small_out_indents = (isset($widget_config['widgets_small_outer_indent']) && !empty($widget_config['widgets_small_outer_indent'])) ? $widget_config['widgets_small_outer_indent'] : null; $widget_small_out_indents = $formatter->css_spacing($widget_small_out_indents); // border $widget_small_border_style = (isset($widget_config['widgets_small_border']) && !empty($widget_config['widgets_small_border'])) ? $widget_config['widgets_small_border'] : 'none'; $widget_small_border_model = (isset($widget_config['widgets_small_border_model']) && !empty($widget_config['widgets_small_border_model'])) ? $widget_config['widgets_small_border_model'] : null; $widget_small_border_color = (isset($widget_config['widgets_small_border_color']) && !empty($widget_config['widgets_small_border_color'])) ? $widget_config['widgets_small_border_color'] : null; $widget_small_border_color = Wpw::inst()->storage()->get($widget_small_border_color); $widget_small_border = $formatter->css_border($widget_small_border_style, $widget_small_border_model, $widget_small_border_color); // radius $widget_small_border_radius = (isset($widget_config['widgets_small_border_radius']) && !empty($widget_config['widgets_small_border_radius'])) ? $widget_config['widgets_small_border_radius'] : null; $widget_small_border_radius = $formatter->css_spacing($widget_small_border_radius); // container width type $widget_small_container_width_type = (isset($widget_config['widgets_small_container_width_type']) && !empty($widget_config['widgets_small_container_width_type'])) ? $widget_config['widgets_small_container_width_type'] : 'full'; $widget_small_container_width = (isset($widget_config['widgets_small_container_width']) && !empty($widget_config['widgets_small_container_width'])) ? $widget_config['widgets_small_container_width'] : null; if ($widget_small_container_width_type == 'full') { $widget_small_container_width = $default_width; } elseif ($widget_small_container_width_type == 'container') { $widget_small_container_width = $widget_small_width_type == $widget_small_container_width_type ? $default_width : $sm_container_width; } $widget_small_container_width = $formatter->css_scalar($widget_small_container_width, $default_width); // inner indents $widget_small_inner_indents = (isset($widget_config['widgets_small_inner_indent']) && !empty($widget_config['widgets_small_inner_indent'])) ? $widget_config['widgets_small_inner_indent'] : null; $widget_small_inner_indents = $formatter->css_spacing($widget_small_inner_indents, $default_indents); $small_widgetfooter_content_alignment = (isset($widget_config['small_widgetfooter_content_alignment']) && !empty($widget_config['small_widgetfooter_content_alignment'])) ? $widget_config['small_widgetfooter_content_alignment'] : null; if ($small_widgetfooter_content_alignment == 'left') { $small_widgetfooter_content_alignment = 'margin-left: 0'; } elseif ($small_widgetfooter_content_alignment == 'right') { $small_widgetfooter_content_alignment = 'margin-right: 0;'; } //------------------------------ bg -----------------------------------------------// $_widget_bg = (isset($widget_config['widgets_background']) && !empty($widget_config['widgets_background'])) ? $widget_config['widgets_background'] : null; $widget_bg = $formatter->from_bg($_widget_bg); //------------------------------ typo -----------------------------------------------// $widgets_footer_typography_typography = !empty($widget_config['widgets_footer_typography_typography']) ? $widget_config['widgets_footer_typography_typography'] : 'main'; $widgets_footer_typography_typography = $formatter->dynamic_typography($widgets_footer_typography_typography, '.footer-widget .footer-widget__content thead, .footer-widget .footer-widget__content td, .footer-widget .widget_archive li, .footer-widget .widget-title > h3, .footer-widget .widget_categories li, .footer-widget .footer-widget__content, .footer-widget label, .footer-widget table#wp-calendar tr > td, .footer-widget .widget span.woocommerce-Price-amount, .footer-widget .recent-post-info .secondary-color, .footer-widget .footer-widget__content .widget, .footer-widget cite, .footer-widget .footer-widget__content .widget a, body .wpw .footer-widget .footer-widget__content a '); $out_style = /** @lang CSS */ ' ' . $mainfooter_links_typography . ' ' . $widgets_footer_typography_typography . ' /*main footer*/ .footer-main .footer-main__content { color: ' . $text_color . '; } .main-footer .footer-main__content a, .main-footer .footer-main__content a > i[class*="ib-"] { color: ' . $mainfooter_links_fg . '; } .main-footer .footer-main__content a:hover, .main-footer .footer-main__content a:hover > i[class*="ib-"], .main-footer .footer-main__content a:hover > i[class*="ib-"]:hover { color: ' . $mainfooter_links_hover_fg . '; } .main-footer .footer-main__content a .color-layer, .main-footer .footer-main__content a > i[class*="ib-"] .color-layer { background-color: ' . $mainfooter_links_bg . '; } .main-footer .footer-main__content a:hover .color-layer, .main-footer .footer-main__content a:hover > i[class*="ib-"] .color-layer, .main-footer .footer-main__content a:hover > i[class*="ib-"]:hover .color-layer { background-color: ' . $mainfooter_links_hover_bg . '; } .main-footer .footer-main__content { text-align: ' . $mainfooter_text_align . '; } ' . $mainfooter_text_typography . ' .footer-main .footer-main__content .social-links-list { justify-content: ' . $mainfooter_links_align . '; } body .wpw .footer-main .footer-main__content a { color: ' . $mainfooter_links_fg . '; background-color: ' . $mainfooter_links_bg . '; padding: ' . $mainfooter_links_padding . '; margin: ' . $mainfooter_links_margin . '; border-top: ' . $mainfooter_links_border['top'] . '; border-bottom: ' . $mainfooter_links_border['bottom'] . '; border-right: ' . $mainfooter_links_border['right'] . '; border-left: ' . $mainfooter_links_border['left'] . '; border-radius: ' . $mainfooter_links_border_radius . '; } body .wpw .footer-main .footer-main__content a:hover { color: ' . $mainfooter_links_hover_fg . '; background-color: ' . $mainfooter_links_hover_bg . '; padding: ' . $mainfooter_links_padding . '; border-top: ' . $mainfooter_links_hover_border['top'] . '; border-bottom: ' . $mainfooter_links_hover_border['bottom'] . '; border-right: ' . $mainfooter_links_hover_border['right'] . '; border-left: ' . $mainfooter_links_hover_border['left'] . '; border-radius: ' . $mainfooter_links_hover_border_radius . '; } @media (min-width: 0px) and (max-width: 767px) { .footer-main .footer-main__section { max-width: ' . $small_width . '; ' . $small_mainfooter_alignment . '; } .footer-main { padding: ' . $small_out_indents . '; } .footer-main .footer-main__content { ' . $small_mainfooter_content_alignment . ' } .footer-main .footer-main__section .panels-bg { border-top: ' . $small_border['top'] . '; border-bottom: ' . $small_border['bottom'] . '; border-right: ' . $small_border['right'] . '; border-left: ' . $small_border['left'] . '; border-radius: ' . $small_border_radius . '; } .footer-main .footer-main__section .footer-main__content { max-width: ' . $small_container_width . '; } .footer-main .footer-main__section .footer-main__content-wrapper { padding: ' . $small_inner_indents . '; } } @media (min-width: 768px) and (max-width: 991px) { .footer-main .footer-main__section { max-width: ' . $middle_width . '; ' . $middle_mainfooter_alignment . '; } .footer-main { padding: ' . $middle_out_indents . '; } .footer-main .footer-main__content { ' . $middle_mainfooter_content_alignment . ' } .footer-main .footer-main__section .panels-bg { border-top: ' . $middle_border['top'] . '; border-bottom: ' . $middle_border['bottom'] . '; border-right: ' . $middle_border['right'] . '; border-left: ' . $middle_border['left'] . '; border-radius: ' . $middle_border_radius . '; } .footer-main .footer-main__section .footer-main__content { max-width: ' . $middle_container_width . '; } .footer-main .footer-main__section .footer-main__content-wrapper { padding: ' . $middle_inner_indents . '; } } @media (min-width: 992px) { .footer-main .footer-main__section { max-width: ' . $width . '; ' . $mainfooter_alignment . '; } .footer-main { padding: ' . $out_indents . '; } .footer-main .footer-main__content { ' . $mainfooter_content_alignment . ' } .footer-main .footer-main__section .panels-bg { border-top: ' . $border['top'] . '; border-bottom: ' . $border['bottom'] . '; border-right: ' . $border['right'] . '; border-left: ' . $border['left'] . '; border-radius: ' . $border_radius . '; } .footer-main .footer-main__section .footer-main__content { max-width: ' . $container_width . '; } .footer-main .footer-main__section .footer-main__content-wrapper { padding: ' . $inner_indents . '; } } /*widget footer*/ .footer-widget .footer-widget__content thead, .footer-widget .footer-widget__content td, .footer-widget .widget_archive li, .footer-widget .widget-title > h3, .footer-widget .widget_categories li, .footer-widget .footer-widget__content, .footer-widget label, .footer-widget table#wp-calendar tr > td, .footer-widget .widget span.woocommerce-Price-amount, .footer-widget .recent-post-info .secondary-color, .footer-widget .footer-widget__content .widget, .footer-widget cite { color: ' . $widgets_text_color . '; } .footer-widget .footer-widget__content .widget a, body .wpw .footer-widget .footer-widget__content a { color: ' . $widgets_links_color . '; } .footer-widget .footer-widget__content .widget a:hover, body .wpw .footer-widget .footer-widget__content a:hover { color: ' . $widgets_links_hover . '; } @media (min-width: 0px) and (max-width: 767px) { .footer-widget .footer-widget__section { max-width: ' . $widget_small_width . '; ' . $small_widgetfooter_alignment . '; } .footer-widget { padding: ' . $widget_small_out_indents . '; } .footer-widget .footer-widget__content { ' . $small_widgetfooter_content_alignment . ' } .footer-widget .footer-widget__section .panels-bg { border-top: ' . $widget_small_border['top'] . '; border-bottom: ' . $widget_small_border['bottom'] . '; border-right: ' . $widget_small_border['right'] . '; border-left: ' . $widget_small_border['left'] . '; border-radius: ' . $widget_small_border_radius . '; } .footer-widget .footer-widget__section .footer-widget__content { max-width: ' . $widget_small_container_width . '; } .footer-widget .footer-widget__section .footer-widget__content-wrapper { padding: ' . $widget_small_inner_indents . '; } } @media (min-width: 768px) and (max-width: 991px) { .footer-widget .footer-widget__section { max-width: ' . $widget_middle_width . '; ' . $middle_widgetfooter_alignment . '; } .footer-widget { padding: ' . $widget_middle_out_indents . '; } .footer-widget .footer-widget__content { ' . $middle_widgetfooter_content_alignment . ' } .footer-widget .footer-widget__section .panels-bg { border-top: ' . $widget_middle_border['top'] . '; border-bottom: ' . $widget_middle_border['bottom'] . '; border-right: ' . $widget_middle_border['right'] . '; border-left: ' . $widget_middle_border['left'] . '; border-radius: ' . $widget_middle_border_radius . '; } .footer-widget .footer-widget__section .footer-widget__content { max-width: ' . $widget_middle_container_width . '; } .footer-widget .footer-widget__section .footer-widget__content-wrapper { padding: ' . $widget_middle_inner_indents . '; } } @media (min-width: 992px) { .footer-widget .footer-widget__section { max-width: ' . $widget_width . '; ' . $widgetfooter_alignment . '; } .footer-widget { padding: ' . $widget_out_indents . '; } .footer-widget .footer-widget__content { ' . $widgetfooter_content_alignment . ' } .footer-widget .footer-widget__section .panels-bg { border-top: ' . $widget_border['top'] . '; border-bottom: ' . $widget_border['bottom'] . '; border-right: ' . $widget_border['right'] . '; border-left: ' . $widget_border['left'] . '; border-radius: ' . $widget_border_radius . '; } .footer-widget .footer-widget__section .footer-widget__content { max-width: ' . $widget_container_width . '; } .footer-widget .footer-widget__section .footer-widget__content-wrapper { padding: ' . $widget_inner_indents . '; } } '; if (!$formatter->is_empty_bg($_bg)) { $out_style .= ' .footer-main .footer-main__section .panels-bg > .image-layer { background-image: url("' . $bg['image'] . '"); } .footer-main .footer-main__section .panels-bg > .pattern-layer { background-image: url("' . $bg['pattern'] . '"); background-repeat: repeat; opacity: ' . $bg['pattern_opacity'] . ' } .footer-main .footer-main__section .panels-bg > .gradient-layer{ ' . $bg['gradient'] . ' } .footer-main .footer-main__section .panels-bg > div.color-layer { background-color: ' . $bg['color'] . '; } '; } // bg widget footer if (!$formatter->is_empty_bg($_widget_bg)) { $out_style .= ' .footer-widget .footer-widget__section > .panels-bg > .image-layer { background-image: url("' . $widget_bg['image'] . '"); } .footer-widget .footer-widget__section > .panels-bg > .pattern-layer { background-image: url("' . $widget_bg['pattern'] . '"); background-repeat: repeat; opacity: ' . $widget_bg['pattern_opacity'] . ' } .footer-widget .footer-widget__section > .panels-bg > .gradient-layer { ' . $widget_bg['gradient'] . ' } .footer-widget .footer-widget__section > .panels-bg > div.color-layer { background-color: ' . $widget_bg['color'] . '; } '; } return $out_style;