+ $this->add_setting( 'custom_logo', array(
+ 'theme_supports' => array( 'custom-logo' ),
+ 'transport' => 'postMessage',
+ ) );
+
+ $custom_logo_args = get_theme_support( 'custom-logo' );
+ $this->add_control( new WP_Customize_Cropped_Image_Control( $this, 'custom_logo', array(
+ 'label' => __( 'Logo' ),
+ 'section' => 'title_tagline',
+ 'priority' => 8,
+ 'height' => $custom_logo_args[0]['height'],
+ 'width' => $custom_logo_args[0]['width'],
+ 'flex_height' => $custom_logo_args[0]['flex-height'],
+ 'flex_width' => $custom_logo_args[0]['flex-width'],
+ 'button_labels' => array(
+ 'select' => __( 'Select logo' ),
+ 'change' => __( 'Change logo' ),
+ 'remove' => __( 'Remove' ),
+ 'default' => __( 'Default' ),
+ 'placeholder' => __( 'No logo selected' ),
+ 'frame_title' => __( 'Select logo' ),
+ 'frame_button' => __( 'Choose logo' ),
+ ),
+ ) ) );
+
+ $this->selective_refresh->add_partial( 'custom_logo', array(
+ 'settings' => array( 'custom_logo' ),
+ 'selector' => '.custom-logo-link',
+ 'render_callback' => array( $this, '_render_custom_logo_partial' ),
+ 'container_inclusive' => true,
+ ) );
+