Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#36581 new enhancement

Customizer Header Image Control should extend the cropped image control

Reported by: celloexpressions's profile 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 (7)

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


8 years ago

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


8 years ago

#3 @afercia
8 years ago

Related: #38156.

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


8 years ago

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


8 years ago

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


8 years ago

Note: See TracTickets for help on using tickets.