WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 3 weeks ago

#36581 new enhancement

Customizer Header Image Control should extend the cropped image control

Reported by: celloexpressions Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: needs-patch
Focuses: javascript Cc:

Description

WP_Customize_Header_Image_Control was written (in 3.9) before all of the other customizer media controls were refactored to use the media library (in 4.1) and additional controls were introduced (in 4.2 and 4.3). It uses an almost entirely separate codebase right now, and by merging it back in to use the newer functions, future enhancements can be made in fewer places to apply to more controls, and the cropped-image control will likely benefit with some new reusable features as well. Additionally, this cleanup will simplify the codebase and make it much easier to contribute to and understand the way the headers UI works, and why.

Ideally, we would be able to use WP_Customize_Cropped_Image_Control directly for header images by bringing more features that are currently specific to headers to all media controls. However, in practice we may end up needing it to remain a distinct control for various reasons. Regardless, it should extend WP_Customize_Cropped_Image_Control directly and make use of its functions in both PHP and JS where possible. Additionally, it should leverage the core API for JS-templated contols introduced in 4.1.

See #29211, and #32861, which would likely be fixed in the process of implementing this ticket.

Change History (6)

This ticket was mentioned in Slack in #core-themes by celloexpressions. View the logs.


6 months ago

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.


6 months ago

#3 @afercia
6 months ago

Related: #38156.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


5 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


5 months ago

This ticket was mentioned in Slack in #core-media by desrosj. View the logs.


3 weeks ago

Note: See TracTickets for help on using tickets.