add_section( 'appmela_count_section', array( 'title' => esc_html__( 'Count Down Section', 'appmela' ), 'priority' => 20, 'capability' => 'edit_theme_options', 'panel' => 'appmela_front_option', ) ); //Enable Count Section $wp_customize->add_setting( 'appmela_count_enable', array( 'default' => '', 'sanitize_callback' => 'appmela_sanitize_checkbox', ) ); $wp_customize->add_control( 'appmela_count_enable', array( 'label' => esc_html__( 'Enable Count Down Section', 'appmela' ), 'section' => 'appmela_count_section', 'type' => 'checkbox', 'priority' => 10, ) ); $count_no = 4; for( $i = 1; $i <= $count_no; $i++ ) { $appmela_count_icon = 'appmela_count_icon_' . $i; $appmela_count_no = 'appmela_count_no_' . $i; $appmela_count_title = 'appmela_count_title_' . $i; // Count Down Icon $wp_customize->add_setting( $appmela_count_icon, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $appmela_count_icon, array( 'label' => esc_html__( 'Count Down Icon ', 'appmela' ).$i, 'description' => esc_html__( 'Use "Icofont" icon class. Example: icofont-downloaded', 'appmela' ), 'section' => 'appmela_count_section', 'type' => 'text', 'priority' => 10, ) ); // Count Down Number $wp_customize->add_setting( $appmela_count_no, array( 'default' => '', 'sanitize_callback' => 'appmela_sanitize_number_absint', ) ); $wp_customize->add_control( $appmela_count_no, array( 'label' => esc_html__( 'Count Down Number ', 'appmela' ).$i, 'section' => 'appmela_count_section', 'type' => 'number', 'priority' => 10, ) ); // Count Down Title $wp_customize->add_setting( $appmela_count_title, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $appmela_count_title, array( 'label' => esc_html__( 'Count Down Title ', 'appmela' ).$i, 'section' => 'appmela_count_section', 'type' => 'text', 'priority' => 10, ) ); } ?>