WP_Customize_Cropped_Image_Control example

$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'        => isset( $custom_logo_args[0]['height'] ) ? $custom_logo_args[0]['height'] : null,
                    'width'         => isset( $custom_logo_args[0]['width'] ) ? $custom_logo_args[0]['width'] : null,
                    'flex_height'   => isset( $custom_logo_args[0]['flex-height'] ) ? $custom_logo_args[0]['flex-height'] : null,
                    'flex_width'    => isset( $custom_logo_args[0]['flex-width'] ) ? $custom_logo_args[0]['flex-width'] : null,
                    'button_labels' => array(
                        
Home | Imprint | This part of the site doesn't use cookies.