[wp-trac] [WordPress Trac] #30062: Add Hooks to Image Editor UI
WordPress Trac
noreply at wordpress.org
Tue Oct 21 21:39:11 UTC 2014
#30062: Add Hooks to Image Editor UI
---------------------------------+---------------------------------
Reporter: ericmann | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch has-tests | Focuses: ui, administration
---------------------------------+---------------------------------
Changes (by ericmann):
* keywords: => has-patch has-tests
Comment:
We used this concept as a team hackathon - our original goal was to add
`<picture>` style art direction support to the image editor, but the lack
of hooks within the `wp_image_editor()` UI prevented any manipulation.
Instead, we focused on making the UI more modular. attachment:30062.diff
introduces several new functions - we used the add/remove
register/unregister paradigm frequently implemented within WordPress to
manage a list of editor groups for within the UI. The `wp_image_editor()`
function has also been refactored to use the same mechanism to
register/load/print existing core sections.
We've added unit tests for the new functions, and also added escaping for
variable output within existing code (i.e. moved the markup generation
routines to discrete callbacks and ensured that passed args like
`$post_id` are properly escaped).
The project in all was a collaborative effort by:
@bswatson
@ednoles
@jonbellah
@sabreuse
@kylereicks
@ericmann
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30062#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list