[wp-trac] [WordPress Trac] #21785: Add header image uploads with cropping to the customizer
WordPress Trac
noreply at wordpress.org
Fri Feb 21 21:41:09 UTC 2014
#21785: Add header image uploads with cropping to the customizer
----------------------------+-----------------------------
Reporter: nacin | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: Future Release
Component: Appearance | Version: 3.4
Severity: normal | Resolution:
Keywords: | Focuses: javascript
----------------------------+-----------------------------
Comment (by mcsf):
These patches add cropping support to a newly developed Header Image
control in the Customizer. This is our first pass at merging the plugin we
developed into core, we’re sure there are things to be
added/corrected/debated — feedback would be greatly appreciated.
— Brought to you by team @ehg & @mcsf
[https://core.trac.wordpress.org/attachment/ticket/21785/21785-media-
manager.diff 21785-media-manager.diff]
- Adds a Cropper controller and view to the Media Manager + L10n
- Allows us to add HTML to the title/minimised menu item title
[https://core.trac.wordpress.org/attachment/ticket/21785/21785-customizer-
header.diff 21785-customizer-header.diff]
- Replaces `WP_Customize_Header_Image_Control` from scratch using:
- Underscore templates;
- Extended backend logic to keep track of and remove recently used
image.
- Adds a `wp.customize.HeaderControl`, which leverages:
- The new cropping feature in the Media Manager;
- The existing `imgAreaSelect` plugin to select an area of the image
to crop;
- Backbone views, models and collections for header images.
- Refactors `wp-admin/custom-header.php` and adds 3 AJAX endpoints to it
for adding, removing and cropping images.
- Adds a lib, `jquery-slimscroll`, which we use to scroll uploaded header
images in a limited height container.
- Adds relevant CSS and a PNG image (see below).
[https://core.trac.wordpress.org/attachment/ticket/21785/21785-tests.diff
21785-tests.diff]
- Adds `sinon.js` for mocking/stubbing/spying for qunit js tests.
- Adds tests & fixtures for the Backbone header models/collections.
- Adds phpunit tests for header dimension calculations & extracted
`custom-header.php` functions.
[https://core.trac.wordpress.org/attachment/ticket/21785/close-
button.light.png src/wp-admin/images/close-button.light.png]
- The remove image button for the header control.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21785#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list