[wp-trac] [WordPress Trac] #21811: Add image editing UI to the media modal
WordPress Trac
noreply at wordpress.org
Mon Feb 3 20:56:15 UTC 2014
#21811: Add image editing UI to the media modal
-----------------------------+-----------------------------
Reporter: koopersmith | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------------
Changes (by tomauger):
* keywords: => has-patch
Comment:
Patch notes for
[https://core.trac.wordpress.org/attachment/ticket/21811/trac-21811
-extensible-image-editor.patch trac-21811-extensible-image-editor.patch]:
This patches the following core files:
- wp-admin/edit-form-advanced.php:
* adds an action 'enqueue_image_editor_scripts' to allow plugin/theme
devs a good spot to hook in their own image editor js/css.
- wp-admin/includes/image-edit.php:
* adds `add_image_edit_group()` and `remove_image_edit_group()` to allow
easy, `add_meta_box`-like modification of the ImgEditGroup boxes in the
editor, grouped into tabs if needed / desired.
* provides a corresponding action `add_image_editor_groups` for the
proper place to hook into to add/remove image editor groups
* provides an `image_editor_groups` filter for deeper modifications of
editor groups if needed.
* refactors all the HTML creation of the imgedit-groups used in
`wp_image_editor()` to leverage the new way of creating these modular
groups.
* includes some tab/whitespace fixes to the HTML output of the TABLE
structure, cause I'm anal that way.
- wp-admin/js/image-edit.js
* added an `addEventListener()` method to the global `imageEdit` that
allows other scripts to register against event listeners that are
dispatched at specific points within the Image Editor workflow.
* added the `dispatchEvent()` method that is used by imageEdit to
dispatch those specific events.
* added an `events` object that contains the event type constants used
to identify a specific event.
* sadly, the whole file is different because I changed the indent level
of the first inner block.
I will follow this patch with a new plugin that demonstrates how to use
these new features. Comments are welcome!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21811#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list