add_section( 'appmela_feature_section', array( 'capability' => 'edit_theme_options', 'priority' => 40, 'title' => __( 'Feature Section', 'appmela' ), 'description' => __( 'This is Feature Selection', 'appmela' ), 'panel' => 'appmela_front_option' ) ); //Enable Feature Section $wp_customize->add_setting( 'appmela_feature_enable', array( 'default' => '', 'sanitize_callback' => 'appmela_sanitize_checkbox', ) ); $wp_customize->add_control( 'appmela_feature_enable', array( 'label' => esc_html__( 'Show Feature Section', 'appmela' ), 'section' => 'appmela_feature_section', 'type' => 'checkbox', 'priority' => 10, ) ); //Feature Title $wp_customize->add_setting( 'appmela_feature_title', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'appmela_feature_title', array( 'label' => __( 'Feature Title: ', 'appmela' ), 'section' => 'appmela_feature_section', 'type' => 'text', 'priority' => 20, 'settings' => 'appmela_feature_title', ) ); //Feature Content $wp_customize->add_setting( 'appmela_feature_content', array( 'capability' => 'edit_theme_options', 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'appmela_feature_content', array( 'label' => __( 'Feature Content: ', 'appmela' ), 'section' => 'appmela_feature_section', 'type' => 'textarea', 'priority' => 30, 'settings' => 'appmela_feature_content', ) ); $feature_no = 6; for( $i = 1; $i <= $feature_no; $i++ ) { $appmela_feature_icon = 'appmela_feature_icon_' . $i; $appmela_feature_pages = 'appmela_feature_pages_' . $i; // feature Icon $wp_customize->add_setting( $appmela_feature_icon, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $appmela_feature_icon, array( 'label' => esc_html__( 'Feature Page Icon ', 'appmela' ).$i, 'description' => esc_html__( 'Use FontAwesome icon class. Example: fa fa-icon', 'appmela' ), 'section' => 'appmela_feature_section', 'type' => 'text', 'priority' => 40, ) ); // Feature Pages Selection $wp_customize->add_setting( $appmela_feature_pages, array( 'default' => '', 'sanitize_callback' => 'appmela_sanitize_dropdown_pages', ) ); $wp_customize->add_control( $appmela_feature_pages, array( 'label' => esc_html__( 'Feature Page ', 'appmela' ).$i, 'section' => 'appmela_feature_section', 'type' => 'dropdown-pages', 'priority' => 40, ) ); } ?>