add_section( 'bizhunt_choose_section', array( 'title' => esc_html__( 'Why Choose Section', 'bizhunt' ), 'priority' => 50, 'capability' => 'edit_theme_options', 'panel' => 'bizhunt_front_option', ) ); //Enable Choose Section $wp_customize->add_setting( 'bizhunt_choose_enable', array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_checkbox', ) ); $wp_customize->add_control( 'bizhunt_choose_enable', array( 'label' => esc_html__( 'Enable Why Choose Section', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'type' => 'checkbox', 'priority' => 10, ) ); //Why Choose Video Url $wp_customize->add_setting( 'bizhunt_choose_video_url', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'bizhunt_choose_video_url', array( 'label' => __( 'Video URl ', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'type' => 'url', 'priority' => 20, 'settings' => 'bizhunt_choose_video_url', ) ); //Why Choose Video Image $wp_customize->add_setting( 'bizhunt_choose_video_image', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_image' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bizhunt_choose_video_image', array( 'label' => __( 'Upload a Image', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'priority' => 30, 'settings' => 'bizhunt_choose_video_image' ) ) ); //Why Choose Section Title $wp_customize->add_setting( 'bizhunt_choose_title', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_choose_title', array( 'label' => esc_html__( 'Why Choose Section Title', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'type' => 'text', 'priority' => 40, ) ); //Why Choose Section Sub Title $wp_customize->add_setting( 'bizhunt_choose_subtitle', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_choose_subtitle', array( 'label' => esc_html__( 'Why Choose Section Sub Title', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'type' => 'text', 'priority' => 50, ) ); //Why Choose Section Content $wp_customize->add_setting( 'bizhunt_choose_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_choose_content', array( 'label' => esc_html__( 'Why Choose Section Content', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'type' => 'text', 'priority' => 60, ) ); $choose_no = 4; for( $i = 1; $i <= $choose_no; $i++ ) { $bizhunt_choose_icon = 'bizhunt_choose_icon_' . $i; $bizhunt_choose_page = 'bizhunt_choose_page_' . $i; //Why Choose Icon $wp_customize->add_setting( $bizhunt_choose_icon, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $bizhunt_choose_icon, array( 'label' => esc_html__( 'Why Choose Icon ', 'bizhunt' ).$i, 'description' => esc_html__( 'Use FontAwesome icon class. Example: fa-bicycle', 'bizhunt' ), 'section' => 'bizhunt_choose_section', 'type' => 'text', 'priority' => 70, ) ); //Why Choose Page $wp_customize->add_setting( $bizhunt_choose_page, array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_dropdown_pages', ) ); $wp_customize->add_control( $bizhunt_choose_page, array( 'label' => esc_html__( 'Why Choose Page ', 'bizhunt' ).$i, 'section' => 'bizhunt_choose_section', 'type' => 'dropdown-pages', 'priority' => 70, ) ); } ?>