add_section( 'progress_section_settings', array( 'title' => esc_html__( 'progress Section', 'bizprime' ), 'priority' => 400, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_section', ) ); // Setting - show-progress-section. $wp_customize->add_setting( 'theme_options[show-progress-section]', array( 'default' => $default['show-progress-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show-progress-section]', array( 'label' => esc_html__( 'Enable Progress', 'bizprime' ), 'section' => 'progress_section_settings', 'type' => 'checkbox', 'priority' => 100, ) ); /*No of progress style 1*/ $wp_customize->add_setting( 'theme_options[number-of-home-progress-style-1]', array( 'default' => $default['number-of-home-progress-style-1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[number-of-home-progress-style-1]', array( 'label' => esc_html__( 'Select No Of Progress For Style First', 'bizprime' ), 'description' => __( 'After choosing "Select No Of Progress For Style 1" option please save and publish and refresh to get actual no of field bellow.', 'bizprime' ), 'section' => 'progress_section_settings', 'choices' => array( '1' => __( '1', 'bizprime' ), '2' => __( '2', 'bizprime' ), '3' => __( '3', 'bizprime' ), '4' => __( '4', 'bizprime' ), '5' => __( '5', 'bizprime' ), '6' => __( '6', 'bizprime' ), ), 'type' => 'select', 'priority' => 170, ) ); /*No of progress style 1*/ for ( $i=1; $i <= bizprime_get_option( 'number-of-home-progress-style-1' ) ; $i++ ) { $wp_customize->add_setting( 'theme_options[home-progress-title-style-1-'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[home-progress-title-style-1-'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 250px;' ), 'label' => esc_html__( 'Progress Title style first ', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'progress_section_settings', 'type' => 'text', 'priority' => 180, ) ); $wp_customize->add_setting( 'theme_options[home-progress-number-style-1-'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', 'sanitize_callback' => 'bizprime_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[home-progress-number-style-1-'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 250px;' ), 'label' => esc_html__( 'Progress Number style first ', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'progress_section_settings', 'type' => 'number', 'priority' => 180, 'input_attrs' => array( 'min' => 1, 'max' => 5000, 'style' => 'width: 150px;' ), ) ); } /*No of progress style 2*/ $wp_customize->add_setting( 'theme_options[number-of-home-progress-style-2]', array( 'default' => $default['number-of-home-progress-style-2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[number-of-home-progress-style-2]', array( 'label' => esc_html__( 'Select No Of Progress For Style Second', 'bizprime' ), 'description' => __( 'After choosing "Select No Of Progress For Style 2" option please save and publish and refresh to get actual no of field bellow.', 'bizprime' ), 'section' => 'progress_section_settings', 'choices' => array( '1' => __( '1', 'bizprime' ), '2' => __( '2', 'bizprime' ), '3' => __( '3', 'bizprime' ), '4' => __( '4', 'bizprime' ), '5' => __( '5', 'bizprime' ), '6' => __( '6', 'bizprime' ), ), 'type' => 'select', 'priority' => 190, ) ); /*No of progress style 2*/ for ( $i=1; $i <= bizprime_get_option( 'number-of-home-progress-style-2' ) ; $i++ ) { $wp_customize->add_setting( 'theme_options[home-progress-title-style-2-'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[home-progress-title-style-2-'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 250px;' ), 'label' => esc_html__( 'Progress Title style second ', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'progress_section_settings', 'type' => 'text', 'priority' => 200, ) ); $wp_customize->add_setting( 'theme_options[home-progress-number-style-2-'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', 'sanitize_callback' => 'bizprime_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[home-progress-number-style-2-'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 250px;' ), 'label' => esc_html__( 'Progress Number style second ', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'progress_section_settings', 'type' => 'number', 'priority' => 200, 'input_attrs' => array( 'min' => 1, 'max' => 5000, 'style' => 'width: 150px;' ), ) ); }