add_section( 'section_home_travel', array( 'title' => __( 'Popular Posts', 'akisa' ), 'priority' => 35, 'capability' => 'edit_theme_options', 'panel' => 'home_page_panel', ) ); $wp_customize->add_setting( 'theme_options[disable_travel_section]', array( 'default' => $default['disable_travel_section'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'akisa_sanitize_switch_control', ) ); $wp_customize->add_control( new Akisa_Switch_Control( $wp_customize, 'theme_options[disable_travel_section]', array( 'label' => __('Enable/Disable Popular Section', 'akisa'), 'section' => 'section_home_travel', 'settings' => 'theme_options[disable_travel_section]', 'on_off_label' => akisa_switch_options(), ) ) ); // Add arrow enable setting and control. $wp_customize->add_setting( 'theme_options[travel_content_align]', array( 'default' => $default['travel_content_align'], 'sanitize_callback' => 'akisa_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[travel_content_align]', array( 'label' => esc_html__( 'Choose Content Align', 'akisa' ), 'section' => 'section_home_travel', 'type' => 'radio', 'active_callback' => 'akisa_travel_active', 'choices' => array( 'content-right' => esc_html__( 'Right Side', 'akisa' ), 'content-left' => esc_html__( 'Left Side', 'akisa' ), ) ) ); //Popular Section title $wp_customize->add_setting('theme_options[travel_title]', array( 'default' => $default['travel_title'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control('theme_options[travel_title]', array( 'label' => __('Section Title', 'akisa'), 'section' => 'section_home_travel', 'settings' => 'theme_options[travel_title]', 'active_callback' => 'akisa_travel_active', 'type' => 'text' ) ); // Add content enable setting and control. $wp_customize->add_setting( 'theme_options[travel_content_enable]', array( 'default' => $default['travel_content_enable'], 'sanitize_callback' => 'akisa_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[travel_content_enable]', array( 'label' => esc_html__( 'Enable Content', 'akisa' ), 'section' => 'section_home_travel', 'type' => 'checkbox', 'active_callback' => 'akisa_travel_active', ) ); // Number of items $wp_customize->add_setting('theme_options[number_of_travel_items]', array( 'default' => $default['number_of_travel_items'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'akisa_sanitize_number_range' ) ); $wp_customize->add_control('theme_options[number_of_travel_items]', array( 'label' => __('Number of Items', 'akisa'), 'description' => __('Save & Refresh the customizer to see its effect. Maximum is 24(Pro).', 'akisa'), 'section' => 'section_home_travel', 'settings' => 'theme_options[number_of_travel_items]', 'type' => 'number', 'active_callback' => 'akisa_travel_active', 'input_attrs' => array( 'min' => 1, 'max' => 4, 'step' => 1, ), ) ); // Setting Team Category. $wp_customize->add_setting( 'theme_options[travel_category]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Akisa_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[travel_category]', array( 'label' => __( 'Select Category', 'akisa' ), 'section' => 'section_home_travel', 'settings' => 'theme_options[travel_category]', 'active_callback' => 'akisa_travel_active', ) ) );