add_section( 'services_section_settings', array( 'title' => esc_html__( 'Service Section', 'bizindustries' ), 'description' => '', 'panel' => 'bizindustries_frontpage_settings', 'priority' => 2, ) ); $wp_customize->add_setting( 'services_section_enable', array( 'default' => false, 'sanitize_callback' => 'bizindustries_sanitize_checkbox', ) ); $wp_customize->add_control( 'services_section_enable', array( 'label' => esc_html__( 'Show/hide service section', 'bizindustries' ), 'description' => esc_html__( 'Check/Uncheck this box to show/hide service section on front page.', 'bizindustries' ), 'section' => 'services_section_settings', 'type' => 'checkbox', 'priority' => 1 ) ); //Section Heading $wp_customize->add_setting( 'services_section_heading', array( 'default' => '', 'sanitize_callback' => 'bizindustries_sanitize_html', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'services_section_heading', array( 'label' => esc_html__( 'Section Heading', 'bizindustries' ), 'section' => 'services_section_settings', 'type' => 'text', 'active_callback' => function(){ if(get_theme_mod('services_section_enable')){ return true; } else { return false; } }, ) ); // Section subheading $wp_customize->add_setting( 'services_section_subheading', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'services_section_subheading', array( 'label' => esc_html__('Section Subheading', 'bizindustries'), 'description'=> '', 'section' => 'services_section_settings', 'type' => 'text', 'active_callback' => function(){ if(get_theme_mod('services_section_enable') == true && get_theme_mod('services_layout') == 'layout-2'){ return true; } else { return false; } }, ) ); // Section Description $wp_customize->add_setting( 'services_section_desc', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'services_section_desc', array( 'label' => esc_html__('Section Description', 'bizindustries'), 'description'=> '', 'section' => 'services_section_settings', 'type' => 'text', 'active_callback' => function(){ if(get_theme_mod('services_section_enable')){ return true; } else { return false; } }, ) ); // Section Description 2 $wp_customize->add_setting( 'services_section_desc_2', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'services_section_desc_2', array( 'label' => esc_html__('Section description part 2', 'bizindustries'), 'description'=> '', 'section' => 'services_section_settings', 'type' => 'text', 'active_callback' => function(){ if(get_theme_mod('services_section_enable') == true && get_theme_mod('services_layout') != 'layout-2'){ return true; } else { return false; } }, ) ); // Services $wp_customize->add_setting( new Bizindustries_Control_Repeater_Setting( $wp_customize, 'bizindustries_services', array( 'default' => '', 'sanitize_callback' => array( 'Bizindustries_Control_Repeater_Setting', 'sanitize_repeater_setting' ), ) ) ); $wp_customize->add_control( new Bizindustries_Control_Repeater( $wp_customize, 'bizindustries_services', array( 'section' => 'services_section_settings', 'label' => esc_html__( 'Services', 'bizindustries' ), 'fields' => array( 'icon' => array( 'type' => 'text', 'label' => esc_html__( 'Icon', 'bizindustries' ), 'description' => esc_html__('Select a icon from https://fontawesome.com/v4.7/icons/ and enter icon class name. Example- fa-bitbucket', 'bizindustries'), ), 'title' => array( 'type' => 'text', 'label' => esc_html__( 'Title', 'bizindustries' ), ), 'description' => array( 'type' => 'textarea', 'label' => esc_html__( 'Descrition', 'bizindustries' ), ), 'btn_text' => array( 'type' => 'text', 'label' => esc_html__( 'Read More', 'bizindustries' ), ), 'link' => array( 'type' => 'url', 'label' => esc_html__( 'Link', 'bizindustries' ), 'description' => esc_html__( 'Example: https://yoursite.com', 'bizindustries' ), ), 'checkbox' => array( 'type' => 'checkbox', 'label' => esc_html__( 'Open link in new tab', 'bizindustries' ), ), ), 'row_label' => array( 'type' => 'field', 'value' => esc_html__( 'service', 'bizindustries' ), 'field' => 'title' ), 'choices' => array( 'limit' => $is_premium==false?4:'' ), 'active_callback' => function(){ if(get_theme_mod('services_section_enable')){ return true; } else { return false; } }, ) ) ); if(class_exists('Bootitems_Core') && bc_fs()->can_use_premium_code() ){ // Layout Settings $wp_customize->add_setting( 'services_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'layout-1', //'transport' => 'postMessage', ) ); $wp_customize->add_control( 'services_layout', array( 'type' => 'select', 'label' => esc_html__( 'Select Layout', 'bizindustries' ), 'section' => 'services_section_settings', 'choices' => array( 'layout-1' => esc_html__( 'Layout One', 'bizindustries' ), 'layout-2' => esc_html__( 'Layout Two', 'bizindustries' ), ), 'active_callback' => function(){ if(get_theme_mod('services_section_enable')){ return true; } else { return false; } }, ) ); } // Count Down $wp_customize->add_setting( new Bizindustries_Control_Repeater_Setting( $wp_customize, 'bizindustries_countdowns', array( 'default' => '', 'sanitize_callback' => array( 'Bizindustries_Control_Repeater_Setting', 'sanitize_repeater_setting' ), ) ) ); $wp_customize->add_control( new Bizindustries_Control_Repeater( $wp_customize, 'bizindustries_countdowns', array( 'section' => 'services_section_settings', 'label' => esc_html__( 'Countdown', 'bizindustries' ), 'fields' => array( 'icon' => array( 'type' => 'text', 'label' => esc_html__( 'Icon', 'bizindustries' ), 'description' => esc_html__('Select a icon from https://fontawesome.com/v4.7/icons/ and enter icon\'s class name. Example- fa-coffee', 'bizindustries'), ), 'number' => array( 'type' => 'text', 'label' => esc_html__( 'Number', 'bizindustries' ), ), 'description' => array( 'type' => 'text', 'label' => esc_html__( 'Descrition', 'bizindustries' ), ), ), 'row_label' => array( 'type' => 'field', 'value' => esc_html__( 'Countdown', 'bizindustries' ), 'field' => 'description' ), 'choices' => array( 'limit' => $is_premium==false?3:'', ), 'active_callback' => function(){ if(get_theme_mod('services_section_enable') == true && get_theme_mod('services_layout') != 'layout-2'){ return true; } else { return false; } }, ) ) ); // Background color $wp_customize->add_setting( 'service_section_bg', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'service_section_bg', array( 'label' => esc_html__( 'Background', 'bizindustries' ), 'description' => '', 'section' => 'services_section_settings', 'active_callback' => function(){ if(get_theme_mod('services_section_enable')){ return true; } else { return false; } }, ) ) );