[wp-trac] [WordPress Trac] #32765: Allow custom Customizer controls to use the WordPress core Cropper with custom dimensions
WordPress Trac
noreply at wordpress.org
Tue Jun 23 17:17:27 UTC 2015
#32765: Allow custom Customizer controls to use the WordPress core Cropper with
custom dimensions
-------------------------+-----------------------------
Reporter: imath | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Hi,
I've been exploring the [https://make.wordpress.org/core/2015/06/10/site-
icon-and-image-cropping-controls/ WP Site Icon] plugin by John Blackbourn,
and i've noticed the Cropper was using a "hardcoded" ajax action set to
`custom-header-crop`.
I think if any custom Customizer control needs to use the Media Editor and
the cropper feature (just like the WP Site Icon), it would be interesting
to add a parameter to the cropper control to set the ajax action. Else,
the image will always be cropped using the custom header dimensions.
The attached patch contains my suggestion.
I've read that #29211 "should be tackled before the site icon
functionality" but i haven't seen in the latest patch attached to it
something about this possible enhancement. I've forked and will soon
submit a pull request to John containing my suggestions about WP Site
Icon, you can see how this enhancement could benefit to WP Site Icon into
these two files:
- https://github.com/imath/wp-site-icon/blob/master/site-icon.php#L159
- https://github.com/imath/wp-site-icon/blob/master/js/control.js#L84
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32765>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list