add_section( 'section_home_recent', array( 'title' => __( 'Recent Posts Section', 'akisa' ), 'priority' => 25, 'capability' => 'edit_theme_options', 'panel' => 'home_page_panel', ) ); $wp_customize->add_setting( 'theme_options[disable_recent_section]', array( 'default' => $default['disable_recent_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_recent_section]', array( 'label' => __('Enable/Disable Recent Posts Section', 'akisa'), 'section' => 'section_home_recent', 'settings' => 'theme_options[disable_recent_section]', 'on_off_label' => akisa_switch_options(), ) ) ); //Sensational Section title $wp_customize->add_setting('theme_options[recent_title]', array( 'default' => $default['recent_title'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control('theme_options[recent_title]', array( 'label' => __('Section Title', 'akisa'), 'section' => 'section_home_recent', 'settings' => 'theme_options[recent_title]', 'active_callback' => 'akisa_recent_active', 'type' => 'text' ) ); // Add category enable setting and control. $wp_customize->add_setting( 'theme_options[recent_category_enable]', array( 'default' => $default['recent_category_enable'], 'sanitize_callback' => 'akisa_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[recent_category_enable]', array( 'label' => esc_html__( 'Enable Category', 'akisa' ), 'section' => 'section_home_recent', 'type' => 'checkbox', 'active_callback' => 'akisa_recent_active', ) ); // Add posted on enable setting and control. $wp_customize->add_setting( 'theme_options[recent_posted_on_enable]', array( 'default' => $default['recent_posted_on_enable'], 'sanitize_callback' => 'akisa_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[recent_posted_on_enable]', array( 'label' => esc_html__( 'Enable Date', 'akisa' ), 'section' => 'section_home_recent', 'type' => 'checkbox', 'active_callback' => 'akisa_recent_active', ) ); // Setting Team Category. $wp_customize->add_setting( 'theme_options[recent_category]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Akisa_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[recent_category]', array( 'label' => __( 'Select Category', 'akisa' ), 'section' => 'section_home_recent', 'settings' => 'theme_options[recent_category]', 'active_callback' => 'akisa_recent_active', ) ) );