/**
  * Adds testimonial section to the Customizer.
  */
 function customize_register($wp_customize)
 {
     jetpack_testimonial_custom_control_classes();
     $wp_customize->add_section('jetpack_testimonials', array('title' => esc_html__('Testimonials', 'jetpack'), 'theme_supports' => self::CUSTOM_POST_TYPE, 'priority' => 130));
     $wp_customize->add_setting('jetpack_testimonials[page-title]', array('default' => esc_html__('Testimonials', 'jetpack'), 'sanitize_callback' => array('Jetpack_Testimonial_Title_Control', 'sanitize_content'), 'sanitize_js_callback' => array('Jetpack_Testimonial_Title_Control', 'sanitize_content')));
     $wp_customize->add_control('jetpack_testimonials[page-title]', array('section' => 'jetpack_testimonials', 'label' => esc_html__('Testimonial Page Title', 'jetpack'), 'type' => 'text'));
     $wp_customize->add_setting('jetpack_testimonials[page-content]', array('default' => '', 'sanitize_callback' => array('Jetpack_Testimonial_Textarea_Control', 'sanitize_content'), 'sanitize_js_callback' => array('Jetpack_Testimonial_Textarea_Control', 'sanitize_content')));
     $wp_customize->add_control(new Jetpack_Testimonial_Textarea_Control($wp_customize, 'jetpack_testimonials[page-content]', array('section' => 'jetpack_testimonials', 'settings' => 'jetpack_testimonials[page-content]', 'label' => esc_html__('Testimonial Page Content', 'jetpack'))));
     $wp_customize->add_setting('jetpack_testimonials[featured-image]', array('default' => '', 'sanitize_callback' => 'attachment_url_to_postid', 'sanitize_js_callback' => 'attachment_url_to_postid', 'theme_supports' => 'post-thumbnails'));
     $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'jetpack_testimonials[featured-image]', array('section' => 'jetpack_testimonials', 'label' => esc_html__('Testimonial Page Featured Image', 'jetpack'))));
     // The featured image control doesn't display properly in the Customizer unless we coerce
     // it back into a URL sooner, since that's what WP_Customize_Upload_Control::to_json() expects
     if (is_admin()) {
         add_filter('theme_mod_jetpack_testimonials', array($this, 'coerce_testimonial_image_to_url'));
     }
 }
 /**
  * Adds testimonial section to the Customizer.
  */
 function customize_register($wp_customize)
 {
     jetpack_testimonial_custom_control_classes();
     $wp_customize->add_section('jetpack_testimonials', array('title' => esc_html__('Testimonials', 'jetpack'), 'theme_supports' => 'jetpack-testimonial'));
     $wp_customize->add_setting('jetpack_testimonials[page-title]', array('default' => esc_html__('Testimonials', 'jetpack'), 'sanitize_callback' => array('Jetpack_Testimonial_Title_Control', 'sanitize_content'), 'sanitize_js_callback' => array('Jetpack_Testimonial_Title_Control', 'sanitize_content')));
     $wp_customize->add_control('jetpack_testimonials[page-title]', array('section' => 'jetpack_testimonials', 'label' => esc_html__('Testimonial Page Title', 'jetpack'), 'type' => 'text'));
     $wp_customize->add_setting('jetpack_testimonials[page-content]', array('default' => '', 'sanitize_callback' => array('Jetpack_Testimonial_Textarea_Control', 'sanitize_content'), 'sanitize_js_callback' => array('Jetpack_Testimonial_Textarea_Control', 'sanitize_content')));
     $wp_customize->add_control(new Jetpack_Testimonial_Textarea_Control($wp_customize, 'jetpack_testimonials[page-content]', array('section' => 'jetpack_testimonials', 'settings' => 'jetpack_testimonials[page-content]', 'label' => esc_html__('Testimonial Page Content', 'jetpack'))));
     if (current_theme_supports('post-thumbnails')) {
         $wp_customize->add_setting('jetpack_testimonials[featured-image]', array('default' => '', 'sanitize_callback' => array('Jetpack_Testimonial_Image_Control', 'attachment_guid_to_id'), 'sanitize_js_callback' => array('Jetpack_Testimonial_Image_Control', 'attachment_guid_to_id')));
         $wp_customize->add_control(new Jetpack_Testimonial_Image_Control($wp_customize, 'jetpack_testimonials[featured-image]', array('section' => 'jetpack_testimonials', 'label' => esc_html__('Testimonial Page Featured Image', 'jetpack'))));
     }
 }