Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
spathe
/
wp-content
/
themes
/
astrip
/
includes
/
theme-options
/
functions
:
custom-css.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php if (!defined('ABSPATH')) { exit(); // exit if access directly } function egnsCustomStyling() { $custom_css = ""; $egns_theme_options = get_option('egns_theme_options'); /************************** * Primary Color Start *************************/ $primary_color = $egns_theme_options['primary_color'] ?? ''; $primary_color_two = $egns_theme_options['primary_color_two'] ?? ''; $primary_color_three = $egns_theme_options['primary_color_three'] ?? ''; if (!empty($primary_color)) { $custom_css .= " :root{ --primary-color1: $primary_color; } "; } if (!empty($primary_color_two)) { $custom_css .= " :root{ --primary-color2: $primary_color_two; } "; } if (!empty($primary_color_three)) { $custom_css .= " :root{ --primary-color3: $primary_color_three; } "; } /************************** * Primary Color End *************************/ /************************** * Header Style Start *************************/ // Header One $header_one_background_color = $egns_theme_options['header_one_formate_color']['header_one_background_color'] ?? ''; $header_one_menu_text_color = $egns_theme_options['header_one_formate_color']['header_one_menu_text_color'] ?? ''; $header_one_menu_hover_text_color = $egns_theme_options['header_one_formate_color']['header_one_menu_hover_text_color'] ?? ''; $header_one_submenu_background_color = $egns_theme_options['header_one_formate_color']['header_one_sub_menu_background_color'] ?? ''; $header_one_submenu_menu_text_color = $egns_theme_options['header_one_formate_color']['header_one_sub_menu_text_color'] ?? ''; $header_one_submenu_menu_hover_text_color = $egns_theme_options['header_one_formate_color']['header_one_sub_menu_hover_text_color'] ?? ''; $header_one_right_side_contact_color = $egns_theme_options['header_one_formate_color']['header_one_right_side_content_color'] ?? ''; // Header one sticky $header_one_background_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_background_color'] ?? ''; $header_one_menu_text_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_menu_text_color'] ?? ''; $header_one_menu_hover_text_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_menu_hover_text_color'] ?? ''; $header_one_submenu_background_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_sub_menu_background_color'] ?? ''; $header_one_submenu_menu_text_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_sub_menu_text_color'] ?? ''; $header_one_submenu_menu_hover_text_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_sub_menu_hover_text_color'] ?? ''; $header_one_right_side_contact_color_s = $egns_theme_options['header_one_formate_color']['sticky_header_one_right_side_content_color'] ?? ''; if (!empty($header_one_background_color)) { $custom_css .= " header.style-2{ background-color: $header_one_background_color; } "; } if (!empty($header_one_menu_text_color)) { $custom_css .= " header.style-2 .main-nav ul li a,header.style-2 .main-nav ul li ul.sub-menu > li a, header.style-2 .main-nav ul li.menu-item-has-children > i,header.style-2 .main-nav ul li ul.sub-menu > li i { color: $header_one_menu_text_color; } "; } if (!empty($header_one_menu_hover_text_color)) { $custom_css .= " header.style-2 .main-nav ul li a:hover,header.style-2 .main-nav ul li ul.sub-menu > li a:hover { color: $header_one_menu_hover_text_color; } "; } if (!empty($header_one_submenu_background_color)) { $custom_css .= " header.style-2 .main-nav ul li ul.sub-menu, header.style-2 .main-nav ul li ul.sub-menu > li .sub-menu { background: $header_one_submenu_background_color; } "; } if (!empty($header_one_submenu_menu_text_color)) { $custom_css .= " header.style-2 .main-nav ul li ul.sub-menu > li a, header.style-2 .main-nav ul li ul.sub-menu > li .sub-menu li a { color: $header_one_submenu_menu_text_color; } "; } if (!empty($header_one_submenu_menu_hover_text_color)) { $custom_css .= " header.style-2 .main-nav ul li ul.sub-menu > li a:hover,header.style-2 .main-nav ul li ul.sub-menu > li .sub-menu li a:hover { color: $header_one_submenu_menu_hover_text_color; } "; } if (!empty($header_one_right_side_contact_color)) { $custom_css .= " header.style-2 .phone-call.sibling2 .number span,header.style-2 .phone-call.sibling2 .number h5 a { color: $header_one_right_side_contact_color; } "; } // Sticky Header One if (!empty($header_one_background_color_s)) { $custom_css .= " header.style-2.sticky{ background: $header_one_background_color_s; } "; } if (!empty($header_one_menu_text_color_s)) { $custom_css .= " header.style-2.sticky .main-nav ul li a, header.style-2.sticky .main-nav ul li.menu-item-has-children > i{ color: $header_one_menu_text_color_s; } "; } if (!empty($header_one_menu_hover_text_color_s)) { $custom_css .= " header.style-2.sticky .main-nav ul li a:hover { color: $header_one_menu_hover_text_color_s; } "; } if (!empty($header_one_submenu_background_color_s)) { $custom_css .= " header.style-2.sticky .main-nav ul li ul.sub-menu, header.style-2.sticky .main-nav ul li ul.sub-menu > li .sub-menu { background: $header_one_submenu_background_color_s; } "; } if (!empty($header_one_submenu_menu_text_color_s)) { $custom_css .= " header.style-2.sticky .main-nav ul li ul.sub-menu > li a, header.style-2.sticky .main-nav ul li ul.sub-menu > li .sub-menu li a { color: $header_one_submenu_menu_text_color_s; } "; } if (!empty($header_one_submenu_menu_hover_text_color_s)) { $custom_css .= " header.style-2.sticky .main-nav ul li ul.sub-menu > li a:hover,header.style-2.sticky .main-nav ul li ul.sub-menu > li .sub-menu li a:hover { color: $header_one_submenu_menu_hover_text_color_s; "; } if (!empty($header_one_right_side_contact_color_s)) { $custom_css .= " header.style-2.sticky .phone-call.sibling2 .number span,header.style-2.sticky .phone-call.sibling2 .number h5 a { color: $header_one_right_side_contact_color_s; } "; } // Header Two $header_two_background_color = $egns_theme_options['header_two_formate_color']['header_two_background_color'] ?? ''; $header_two_menu_text_color = $egns_theme_options['header_two_formate_color']['header_two_menu_text_color'] ?? ''; $header_two_menu_hover_text_color = $egns_theme_options['header_two_formate_color']['header_two_menu_hover_text_color'] ?? ''; $header_two_submenu_background_color = $egns_theme_options['header_two_formate_color']['header_two_sub_menu_background_color'] ?? ''; $header_two_submenu_menu_text_color = $egns_theme_options['header_two_formate_color']['header_two_sub_menu_text_color'] ?? ''; $header_two_submenu_menu_hover_text_color = $egns_theme_options['header_two_formate_color']['header_two_sub_menu_hover_text_color'] ?? ''; $header_two_right_side_contact_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_content_color'] ?? ''; // Button $header_two_right_side_btn_text_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_btn_color'] ?? ''; $header_two_right_side_btn_bac_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_btnbac_color'] ?? ''; $header_two_right_side_btn_border_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_btnbor_color'] ?? ''; $header_two_right_side_btn_hover_text_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_btn_color_hover'] ?? ''; $header_two_right_side_btn_hover_bac_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_btnbac_color_hover'] ?? ''; $header_two_right_side_btn_hov_bor_color = $egns_theme_options['header_two_formate_color']['header_two_right_side_btnbor_color_hover'] ?? ''; // Sticky $header_two_background_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_background_color'] ?? ''; $header_two_menu_text_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_menu_text_color'] ?? ''; $header_two_menu_hover_text_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_menu_hover_text_color'] ?? ''; $header_two_submenu_background_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_sub_menu_background_color'] ?? ''; $header_two_submenu_menu_text_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_sub_menu_text_color'] ?? ''; $header_two_submenu_menu_hover_text_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_sub_menu_hover_text_color'] ?? ''; $header_two_right_side_contact_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_content_color'] ?? ''; // Button $header_two_right_side_btn_text_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_btn_color'] ?? ''; $header_two_right_side_btn_bac_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_btnbac_color'] ?? ''; $header_two_right_side_btn_border_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_btnbor_color'] ?? ''; $header_two_right_side_btn_hover_text_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_btn_color_hover'] ?? ''; $header_two_right_side_btn_hover_bac_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_btnbac_color_hover'] ?? ''; $header_two_right_side_btn_hov_bor_color_s = $egns_theme_options['header_two_formate_color']['sticky_header_two_right_side_btnbor_color_hover'] ?? ''; if (!empty($header_two_background_color)) { $custom_css .= " header.style-4{ background-color: $header_two_background_color; } "; } if (!empty($header_two_menu_text_color)) { $custom_css .= " header.style-4 .main-nav ul li a,header.style-4 .main-nav ul li ul.sub-menu > li a, header.style-4 .main-nav ul li.menu-item-has-children > i,header.style-4 .main-nav ul li ul.sub-menu > li i { color: $header_two_menu_text_color; } "; } if (!empty($header_two_menu_hover_text_color)) { $custom_css .= " header.style-4 .main-nav ul li a:hover,header.style-4 .main-nav ul li ul.sub-menu > li a:hover { color: $header_two_menu_hover_text_color; } "; } if (!empty($header_two_submenu_background_color)) { $custom_css .= " header.style-4 .main-nav ul li ul.sub-menu, header.style-4 .main-nav ul li ul.sub-menu > li .sub-menu { background: $header_two_submenu_background_color; } "; } if (!empty($header_two_submenu_menu_text_color)) { $custom_css .= " header.style-4 .main-nav ul li ul.sub-menu > li a, header.style-4 .main-nav ul li ul.sub-menu > li .sub-menu li a { color: $header_two_submenu_menu_text_color; } "; } if (!empty($header_two_submenu_menu_hover_text_color)) { $custom_css .= " header.style-4 .main-nav ul li ul.sub-menu > li a:hover,header.style-4 .main-nav ul li ul.sub-menu > li .sub-menu li a:hover { color: $header_two_submenu_menu_hover_text_color; } "; } if (!empty($header_two_right_side_contact_color)) { $custom_css .= " header.style-4 .phone-call.sibling2 .number span,header.style-4 .phone-call.sibling2 .number h5 a { color: $header_two_right_side_contact_color; } "; } // Button if (!empty($header_two_right_side_btn_text_color)) { $custom_css .= " header.style-4 .btn--primary2{ color: $header_two_right_side_btn_text_color; } "; } if (!empty($header_two_right_side_btn_bac_color)) { $custom_css .= " header.style-4 .btn--primary2{ background: $header_two_right_side_btn_bac_color; } "; } if (!empty($header_two_right_side_btn_border_color)) { $custom_css .= " header.style-4 .btn--primary2{ border: 2px solid $header_two_right_side_btn_border_color; } "; } if (!empty($header_two_right_side_btn_hover_text_color)) { $custom_css .= " header.style-4 .btn--primary2:hover{ color: $header_two_right_side_btn_hover_text_color; } "; } if (!empty($header_two_right_side_btn_hover_bac_color)) { $custom_css .= " header.style-4 .btn--primary2::after{ background: $header_two_right_side_btn_hover_bac_color; } "; } if (!empty($header_two_right_side_btn_hov_bor_color)) { $custom_css .= " header.style-4 .btn--primary2:hover{ border: 2px solid $header_two_right_side_btn_hov_bor_color ; } "; } // Sticky Header two if (!empty($header_two_background_color_s)) { $custom_css .= " header.style-4.sticky{ background: $header_two_background_color_s; } "; } if (!empty($header_two_menu_text_color_s)) { $custom_css .= " header.style-4.sticky .main-nav ul li a, header.style-4.sticky .main-nav ul li.menu-item-has-children > i { color: $header_two_menu_text_color_s; } "; } if (!empty($header_two_menu_hover_text_color_s)) { $custom_css .= " header.style-4.sticky .main-nav ul li a:hover,header.style-4.sticky .main-nav ul li ul.sub-menu > li a:hover { color: $header_two_menu_hover_text_color_s; } "; } if (!empty($header_two_submenu_background_color_s)) { $custom_css .= " header.style-4.sticky .main-nav ul li ul.sub-menu, header.style-4.sticky .main-nav ul li ul.sub-menu > li .sub-menu { background: $header_two_submenu_background_color_s; } "; } if (!empty($header_two_submenu_menu_text_color_s)) { $custom_css .= " header.style-4.sticky .main-nav ul li ul.sub-menu > li a, header.style-4.sticky .main-nav ul li ul.sub-menu > li .sub-menu li a { color: $header_two_submenu_menu_text_color_s; } "; } if (!empty($header_two_submenu_menu_hover_text_color_s)) { $custom_css .= " header.style-4.sticky .main-nav ul li ul.sub-menu > li a:hover,header.style-4.sticky .main-nav ul li ul.sub-menu > li .sub-menu li a:hover { color: $header_two_submenu_menu_hover_text_color_s; "; } if (!empty($header_two_right_side_contact_color_s)) { $custom_css .= " header.style-4.sticky .phone-call.sibling2 .number span,header.style-4.sticky .phone-call.sibling2 .number h5 a { color: $header_two_right_side_contact_color_s; } "; } // Button if (!empty($header_two_right_side_btn_text_color_s)) { $custom_css .= " header.style-4.sticky .btn--primary2{ color: $header_two_right_side_btn_text_color_s; } "; } if (!empty($header_two_right_side_btn_bac_color_s)) { $custom_css .= " header.style-4.sticky .btn--primary2{ background: $header_two_right_side_btn_bac_color_s; } "; } if (!empty($header_two_right_side_btn_border_color_s)) { $custom_css .= " header.style-4.sticky .btn--primary2{ border: 2px solid $header_two_right_side_btn_border_color_s; } "; } if (!empty($header_two_right_side_btn_hover_text_color_s)) { $custom_css .= " header.style-4.sticky .btn--primary2:hover{ color: $header_two_right_side_btn_hover_text_color_s; } "; } if (!empty($header_two_right_side_btn_hover_bac_color_s)) { $custom_css .= " header.style-4.sticky .btn--primary2::after{ background: $header_two_right_side_btn_hover_bac_color_s; } "; } if (!empty($header_two_right_side_btn_hov_bor_color_s)) { $custom_css .= " header.style-4.sticky .btn--primary2:hover{ border: 2px solid $header_two_right_side_btn_hov_bor_color_s } "; } // Header Three $header_three_background_color = $egns_theme_options['header_three_formate_color']['header_three_background_color'] ?? ''; $header_three_menu_text_color = $egns_theme_options['header_three_formate_color']['header_three_menu_text_color'] ?? ''; $header_three_menu_hover_text_color = $egns_theme_options['header_three_formate_color']['header_three_menu_hover_text_color'] ?? ''; $header_three_icon_color = $egns_theme_options['header_three_formate_color']['header_three_icon_color'] ?? ''; $header_three_user_BG_color = $egns_theme_options['header_three_formate_color']['header_three_user_BG_color'] ?? ''; if (!empty($header_three_background_color)) { $custom_css .= " .main-nav-wrapper .main-nav { background-color: $header_three_background_color; } "; } if (!empty($header_three_menu_text_color)) { $custom_css .= " .main-nav-wrapper .main-nav > ul li a { color: $header_three_menu_text_color; } "; } if (!empty($header_three_menu_hover_text_color)) { $custom_css .= " .main-nav-wrapper .main-nav > ul li a:hover { color: $header_three_menu_hover_text_color; } "; } if (!empty($header_three_icon_color)) { $custom_css .= " .main-nav-wrapper .uesr-aera i { color: $header_three_icon_color; } "; } if (!empty($header_three_user_BG_color)) { $custom_css .= " .main-nav-wrapper .uesr-aera { background: $header_three_user_BG_color; } "; } // Header Topbar $header_topbar_bg_color = $egns_theme_options['header_topbar_bg_color'] ?? ''; $header_topbar_text_color = $egns_theme_options['header_topbar_text_color'] ?? ''; $header_topbar_icon_color = $egns_theme_options['header_topbar_icon_color'] ?? ''; $header_topbar_select_menu_hover_color = $egns_theme_options['header_topbar_select_menu_hover_color'] ?? ''; if (!empty($header_topbar_bg_color)) { $custom_css .= " .topbar { background-color: $header_topbar_bg_color; } "; } if (!empty($header_topbar_text_color)) { $custom_css .= " .topbar .topbar-left .topbar-info-list li,.topbar .topbar-right-list li { color: $header_topbar_text_color; } "; } if (!empty($header_topbar_icon_color)) { $custom_css .= " .topbar .topbar-left .topbar-info-list li i { color: $header_topbar_icon_color; } "; } if (!empty($header_topbar_select_menu_hover_color)) { $custom_css .= " .topbar .topbar-right-list li:hover { color: $header_topbar_select_menu_hover_color; } "; } /************************** * Header Style End *************************/ /************************ * Start Breadcrumb Style ************************/ $breadcrumb_title = $egns_theme_options['breadcrumb_title_typography'] ?? ''; $breadcrumb_bg_color = $egns_theme_options['breadcrumb_bg_color'] ?? ''; $breadcrumb_bg_image = $egns_theme_options['breadcrumb_bg_image']['url'] ?? ''; $breadcrumb_subtitle_color = $egns_theme_options['breadcrumb_subtitle_color'] ?? ''; // Breadcrumb Title $breadcrumb_title_font_size = $breadcrumb_title['font-size'] ?? ''; $breadcrumb_title_font_family = $breadcrumb_title['font-family'] ?? ''; $breadcrumb_title_color = $breadcrumb_title['color'] ?? ''; if (!empty($breadcrumb_title_font_size)) { $custom_css .= " .inner-banner-section .breadcrumb-area h2, .woocommerce-products-header h1 { font-size: $breadcrumb_title_font_size" . 'px' . "; } "; } if (!empty($breadcrumb_title_font_family)) { $custom_css .= " .inner-banner-section .breadcrumb-area h2, .woocommerce-products-header h1 { font-family: $breadcrumb_title_font_family; } "; } if (!empty($breadcrumb_title_color)) { $custom_css .= " .inner-banner-section .breadcrumb-area h2, .woocommerce-products-header h1 { color: $breadcrumb_title_color; } "; } if (!empty($breadcrumb_subtitle_color)) { $custom_css .= " .inner-banner-section .breadcrumb-area span { color: $breadcrumb_subtitle_color; } "; } if (!empty($breadcrumb_bg_color)) { $custom_css .= " .inner-banner-section, .woocommerce-products-header { background-color : $breadcrumb_bg_color; } "; } if (!empty($breadcrumb_bg_image)) { $custom_css .= " .inner-banner-section, .woocommerce-products-header { background-image: url('$breadcrumb_bg_image'); } "; } /********************* * End Breadcrumb Style *********************/ /************************ * Start Footer Style ************************/ $footer_widget_area_background = $egns_theme_options['footer_widget_area_background']['url'] ?? ''; $footer_widget_area_padding_top = $egns_theme_options['footer_widget_area_padding']['top'] ?? ''; $footer_widget_area_padding_bottom = $egns_theme_options['footer_widget_area_padding']['bottom'] ?? ''; $footer_widget_area_padding_unit = $egns_theme_options['footer_widget_area_padding']['unit'] ?? ''; $copyright_area_spacing_top = $egns_theme_options['copyright_area_spacing']['top'] ?? ''; $copyright_area_spacing_bottom = $egns_theme_options['copyright_area_spacing']['bottom'] ?? ''; $copyright_area_spacing_unit = $egns_theme_options['copyright_area_spacing']['unit'] ?? ''; $footer_copyright_area_text_color = $egns_theme_options['footer_copyright_area_text_color'] ?? ''; $footer_copyright_area_link_color = $egns_theme_options['footer_copyright_area_link_color'] ?? ''; $footer_bottom_nav_color = $egns_theme_options['footer_bottom_nav_color'] ?? ''; $footer_bottom_nav_hover_color = $egns_theme_options['footer_bottom_nav_hover_color'] ?? ''; if (!empty($footer_widget_area_padding_top)) { $custom_css .= " .footer-section .footer-top{ padding-top: $footer_widget_area_padding_top$footer_widget_area_padding_unit; } "; } if (!empty($footer_widget_area_background)) { $custom_css .= " .footer-section{ background-image: linear-gradient(rgba(9, 16, 13, 0.88), rgba(9, 16, 13, 0.88)), url('$footer_widget_area_background'); } "; } if (!empty($footer_widget_area_padding_bottom)) { $custom_css .= " .footer-section .footer-top{ padding-bottom: $footer_widget_area_padding_bottom$footer_widget_area_padding_unit; } "; } // Copyright area padding if (!empty($copyright_area_spacing_top)) { $custom_css .= " .footer-section .footer-bottom{ padding-top: $copyright_area_spacing_top$copyright_area_spacing_unit; } "; } if (!empty($copyright_area_spacing_bottom)) { $custom_css .= " .footer-section .footer-bottom{ padding-bottom: $copyright_area_spacing_bottom$copyright_area_spacing_unit; } "; } // Colors if (!empty($footer_copyright_area_text_color)) { $custom_css .= " .footer-section .footer-bottom p { color: $footer_copyright_area_text_color; } "; } if (!empty($footer_copyright_area_link_color)) { $custom_css .= " .footer-section .footer-bottom p a { color: $footer_copyright_area_link_color; } "; } if (!empty($footer_bottom_nav_color)) { $custom_css .= " .footer-section .footer-bottom .f-bottom-list a { color: $footer_bottom_nav_color; } "; } if (!empty($footer_bottom_nav_hover_color)) { $custom_css .= " .footer-section .footer-bottom .f-bottom-list a:hover { color: $footer_bottom_nav_hover_color; } "; } wp_register_style('egns-stylesheet', false); wp_enqueue_style('egns-stylesheet', false); wp_add_inline_style('egns-stylesheet', $custom_css, true); } if (class_exists('CSF')) { add_action('wp_enqueue_scripts', 'egnsCustomStyling'); }