add_section( 'why_choose_section', array( 'title' => __( 'Why Choose Section', 'adventure-travel' ), 'priority' => 25, 'panel' => 'frontpage_settings', ) ); $wp_customize->add_setting( 'ed_why_choose_section', array( 'default' => 'static_banner', 'sanitize_callback' => 'adventure_travel_sanitize_select' ) ); $wp_customize->add_control( 'ed_why_choose_section', array( 'label' => __( 'Enable Why Choose Section', 'adventure-travel' ), 'section' => 'why_choose_section', 'type' => 'checkbox', 'priority' => 10, ) ); /** Title */ $wp_customize->add_setting( 'why_choose_us_title', array( 'default' => __( 'Why Choose Us?', 'adventure-travel' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'why_choose_us_title', array( 'label' => __( 'Why Choose Title', 'adventure-travel' ), 'section' => 'why_choose_section', 'type' => 'text', ) ); /** desc */ $wp_customize->add_setting( 'why_choose_us_desc', array( 'default' => __( 'Let your visitors know why they should trust you and book with you', 'adventure-travel' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'why_choose_us_desc', array( 'label' => __( 'Why Choose Desc', 'adventure-travel' ), 'section' => 'why_choose_section', 'type' => 'text', ) ); /** Why choose us*/ $wp_customize->add_setting( new Adventure_Travel_Repeater_Setting( $wp_customize, 'why_choose_us', array( 'default' => '', 'sanitize_callback' => array( 'Adventure_Travel_Repeater_Setting', 'sanitize_repeater_setting' ), ) ) ); $wp_customize->add_control( new Adventure_Travel_Control_Repeater( $wp_customize, 'why_choose_us', array( 'section' => 'why_choose_section', 'label' => __( 'Why choose us', 'adventure-travel' ), 'fields' => array( 'font' => array( 'type' => 'font', 'label' => __( 'Font Awesome Icon', 'adventure-travel' ), 'description' => __( 'Example: fa-bell', 'adventure-travel' ), ), 'title' => array( 'type' => 'text', 'label' => __( 'Title', 'adventure-travel' ), ), 'desc' => array( 'type' => 'text', 'label' => __( 'Description', 'adventure-travel' ), ) ), 'row_label' => array( 'type' => 'field', 'value' => __( 'why choose us', 'adventure-travel' ), 'field' => 'link' ), 'choices' => array( 'limit' => 8, ), ) ) ); } add_action( 'customize_register', 'adventure_travel_customize_register_frontpage_why_choose_section' );