'ffffff' )); add_theme_support( 'custom-logo', array( 'height' => 70, 'width' => 70, ) ); add_theme_support( 'custom-header', array( 'width' => 1920, 'height' => 100, 'flex-width' => true, 'flex-height' => true, )); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_editor_style( array( '/css/editor-style.css' ) ); } add_action( 'after_setup_theme', 'green_environment_after_setup_theme', 999 ); } if (!function_exists('green_environment_widgets_init')) { function green_environment_widgets_init() { register_sidebar(array( 'name' => esc_html__('Sidebar','green-environment'), 'id' => 'ecology-nature-sidebar', 'description' => esc_html__('This sidebar will be shown next to the content.', 'green-environment'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => esc_html__('Footer sidebar','green-environment'), 'id' => 'ecology-nature-footer-sidebar', 'description' => esc_html__('This sidebar will be shown next at the bottom of your content.', 'green-environment'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } add_action( 'widgets_init', 'green_environment_widgets_init' ); } /*-----------------------------------------------------------------------------------*/ /* Customizer */ /*-----------------------------------------------------------------------------------*/ if ( class_exists("Kirki")){ // FEATURES SECTION Kirki::add_section( 'green_environment_features_section', array( 'title' => esc_html__( 'Our Features Settings', 'green-environment' ), 'description' => esc_html__( 'You have to select category to show features.', 'green-environment' ), 'panel' => 'ecology_nature_panel_id', 'priority' => 170, ) ); Kirki::add_field( 'theme_config_id', [ 'type' => 'custom', 'settings' => 'green_environment_enable_heading', 'section' => 'green_environment_features_section', 'default' => '

' . __( 'Enable / Disable Features', 'green-environment' ) . '

', 'priority' => 10, ] ); Kirki::add_field( 'theme_config_id', [ 'type' => 'switch', 'settings' => 'green_environment_features_section_enable', 'label' => esc_html__( 'Section Enable / Disable', 'green-environment' ), 'section' => 'green_environment_features_section', 'default' => false, 'priority' => 10, 'choices' => [ 'on' => esc_html__( 'Enable', 'green-environment' ), 'off' => esc_html__( 'Disable', 'green-environment' ), ], ] ); Kirki::add_field( 'theme_config_id', [ 'type' => 'custom', 'settings' => 'green_environment_features_heading', 'section' => 'green_environment_features_section', 'default' => '

' . __( 'Features Section ', 'green-environment' ) . '

', 'priority' => 10, ] ); Kirki::add_field( 'theme_config_id', [ 'type' => 'number', 'settings' => 'green_environment_features_counter', 'label' => esc_html__( 'Features Counter Section', 'green-environment' ), 'section' => 'green_environment_features_section', 'default' => 0, 'choices' => [ 'min' => 3, 'max' => 3, 'step' => 1, ], ] ); $green_environment_features_image = get_theme_mod('green_environment_features_counter',''); for ( $i = 1; $i <= $green_environment_features_image; $i++ ) : Kirki::add_field( 'theme_config_id', [ 'type' => 'dashicons', 'settings' => 'green_environment_features_icon_setting'.$i, 'label' => esc_html__( 'Features Icon ', 'green-environment' ).$i, 'section' => 'green_environment_features_section', 'priority' => 10, ] ); Kirki::add_field( 'theme_config_id', [ 'type' => 'text', 'settings' => 'green_environment_features_title_text'.$i, 'label' => esc_html__( 'Features Title Text ', 'green-environment' ).$i, 'section' => 'green_environment_features_section', 'priority' => 10, ] ); Kirki::add_field( 'theme_config_id', [ 'type' => 'textarea', 'settings' => 'green_environment_features_content_text'.$i, 'label' => esc_html__( 'Features Content ', 'green-environment' ).$i, 'section' => 'green_environment_features_section', 'priority' => 10, ] ); endfor; } /*-----------------------------------------------------------------------------------*/ /* Enqueue Global color style */ /*-----------------------------------------------------------------------------------*/ function green_environment_global_color() { $green_environment_theme_color_css = ''; $ecology_nature_global_color = get_theme_mod('ecology_nature_global_color'); $ecology_nature_global_color_2 = get_theme_mod('ecology_nature_global_color_2'); $green_environment_theme_color_css = ' a.shop-btn, p.slider_btn a, #main-menu ul.children li a:hover, #main-menu ul.sub-menu li a:hover, .pagination .nav-links a:hover, .pagination .nav-links a:focus, .pagination .nav-links span.current, .ecology-nature-pagination span.current, .ecology-nature-pagination span.current:hover, .ecology-nature-pagination span.current:focus, .ecology-nature-pagination a span:hover, .ecology-nature-pagination a span:focus, .comment-respond input#submit, .comment-reply a, .sidebar-widget h4.title, .sidebar-area .tagcloud a, .searchform input[type=submit], .searchform input[type=submit]:hover, .searchform input[type=submit]:focus, .menu-toggle, .dropdown-toggle, button.close-menu, nav.woocommerce-MyAccount-navigation ul li, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce a.added_to_cart, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce a.added_to_cart, .scroll-up a,.featuress-icon span,.featuress-icon span, wp-block-button__link, p.wp-block-tag-cloud a,.sidebar-area h4.title, .sidebar-area h1.wp-block-heading, .sidebar-area h2.wp-block-heading, .sidebar-area h3.wp-block-heading, .sidebar-area h4.wp-block-heading, .sidebar-area h5.wp-block-heading, .sidebar-area h6.wp-block-heading, .sidebar-area .wp-block-search__label, .sidebar-area .wp-block-search__button{ background: '.esc_attr($ecology_nature_global_color).'; } @media screen and (min-width: 320px) and (max-width: 767px){ .menu-toggle, .dropdown-toggle, button.close-menu { background: '.esc_attr($ecology_nature_global_color).' !important ; } } a:focus, .contact-box span, .contact-box h6, .logo a:hover, .logo a:focus, .social-links a:hover, #main-menu a:hover, #main-menu ul li a:hover, #main-menu li:hover > a, #main-menu a:focus, #main-menu ul li a:focus, #main-menu li.focus > a, #main-menu li:focus > a, #main-menu ul li.current-menu-item > a, #main-menu ul li.current_page_item > a, #main-menu ul li.current-menu-parent > a, #main-menu ul li.current_page_ancestor > a, #main-menu ul li.current-menu-ancestor > a, .social-links a:hover, .post-meta i, .woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price, .scroll-up a:hover{ color: '.esc_attr($ecology_nature_global_color).'; } .slider .owl-carousel button.owl-dot{ border-color: '.esc_attr($ecology_nature_global_color).'; } span.onsale, .box-content a.button:hover, .box .box-content, .woocommerce a.button:hover, .scroll-up a:hover, nav.woocommerce-MyAccount-navigation ul li:hover, .woocommerce ul.products li.product .onsale, .woocommerce span.onsale, .comment-respond input#submit:hover, .comment-reply a:hover, .woocommerce .cart .button:hover, .woocommerce a.button.alt:hover, a.shop-btn:hover, .woocommerce button.button.alt:hover, p.slider_btn a:hover, .woocommerce button.button:hover, .sidebar-area .tagcloud a:hover, footer.footer-panel, .woocommerce a.added_to_cart:hover, .woocommerce #respond input#submit:hover{ background: '.esc_attr($ecology_nature_global_color_2).'; } h1,h2,h3,h4,h5{ color: '.esc_attr($ecology_nature_global_color_2).'; } .slider .owl-carousel button.owl-dot.active, .sidebar-area h4.title,.sidebar-area h4.title, .sidebar-area h1.wp-block-heading, .sidebar-area h2.wp-block-heading, .sidebar-area h3.wp-block-heading, .sidebar-area h4.wp-block-heading, .sidebar-area h5.wp-block-heading, .sidebar-area h6.wp-block-heading, .sidebar-area .wp-block-search__label{ border-color: '.esc_attr($ecology_nature_global_color_2).'; } '; wp_add_inline_style( 'green-environment-style',$green_environment_theme_color_css ); wp_add_inline_style( 'green-environment-woocommerce-css',$green_environment_theme_color_css ); } add_action( 'wp_enqueue_scripts', 'green_environment_global_color' );