add_section( 'bizhunt_testimonial_section', array( 'title' => esc_html__( 'Testimonial Section', 'bizhunt' ), 'priority' => 80, 'capability' => 'edit_theme_options', 'panel' => 'bizhunt_front_option', ) ); //Enable Testimonial Section $wp_customize->add_setting( 'bizhunt_testimonial_enable', array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_checkbox', ) ); $wp_customize->add_control( 'bizhunt_testimonial_enable', array( 'label' => esc_html__( 'Enable Testimonial Section', 'bizhunt' ), 'section' => 'bizhunt_testimonial_section', 'type' => 'checkbox', 'priority' => 10, ) ); //Testimonial Section Title $wp_customize->add_setting( 'bizhunt_testimonial_title', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_testimonial_title', array( 'label' => esc_html__( 'Testimonial Section Title', 'bizhunt' ), 'section' => 'bizhunt_testimonial_section', 'type' => 'text', 'priority' => 20, ) ); //Testimonial Section Sub Title $wp_customize->add_setting( 'bizhunt_testimonial_subtitle', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_testimonial_subtitle', array( 'label' => esc_html__( 'Testimonial Section Sub Title', 'bizhunt' ), 'section' => 'bizhunt_testimonial_section', 'type' => 'text', 'priority' => 30, ) ); //Testimonial Section Content $wp_customize->add_setting( 'bizhunt_testimonial_content', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bizhunt_testimonial_content', array( 'label' => esc_html__( 'Testimonial Section Content', 'bizhunt' ), 'section' => 'bizhunt_testimonial_section', 'type' => 'text', 'priority' => 40, ) ); $testimonial_page_no = 5; for( $i = 1; $i <= $testimonial_page_no; $i++ ) { $bizhunt_testimonial_page = 'bizhunt_testimonial_page_' . $i; $bizhunt_testimonial_post = 'bizhunt_testimonial_post_' . $i; //Brand Testimonial Page $wp_customize->add_setting( $bizhunt_testimonial_page, array( 'default' => '', 'sanitize_callback' => 'bizhunt_sanitize_dropdown_pages', ) ); $wp_customize->add_control( $bizhunt_testimonial_page, array( 'label' => esc_html__( 'Brand Testimonial Page ', 'bizhunt' ).$i, 'section' => 'bizhunt_testimonial_section', 'type' => 'dropdown-pages', 'priority' => 50, ) ); // Brand Testimonial Post $wp_customize->add_setting( $bizhunt_testimonial_post, array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( $bizhunt_testimonial_post, array( 'label' => esc_html__( 'Brand Testimonial Post ', 'bizhunt' ).$i, 'section' => 'bizhunt_testimonial_section', 'type' => 'text', 'priority' => 50, ) ); } ?>