Customizer: extract a cropped-image control from header images
|Reported by:||celloexpressions||Owned by:||celloexpressions|
Headers in the Customizer do some awesome stuff like allowing an image selected from the media library to be cropped to specific dimensions. We should extract this functionality to a new control, which headers would extend, that allows developers to specify exactly the image size needed for a given image.
Possible API for developers to add such a control:
$wp_customize->add_control( new WP_Customize_Cropped_Image_Control( $wp_customize, 'setting_id', array( // Control args, including inherited ones like label, description, section, etc. 'width' => 200, // px, defaults to 0 (flex-width) 'height' => 200, // px, defaults to 0 (flex-height) ), ) );
This control would obviously extend WP_Customize_Image control ideally, once we hook it up to the media modal.
Change History (39)
23 months ago
21 months ago
- Owner set to celloexpressions
- Status changed from new to assigned