[wp-trac] [WordPress Trac] #22538: 'wp_image_editor_class' vs. 'wp_image_editors'
WordPress Trac
noreply at wordpress.org
Thu Nov 22 22:33:40 UTC 2012
#22538: 'wp_image_editor_class' vs. 'wp_image_editors'
-------------------------+--------------------
Reporter: scribu | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.5
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+--------------------
Comment (by scribu):
It turns out that 'wp_image_editor_class' was essential for unit testing
only because `WP_Image_Editor::__construct()` was protected. Since [22817]
made it public, implementations can be instantiated directly.
I had no trouble making the unit tests work with just
'wp_image_editor_instance':
https://github.com/scribu/wp-tests/compare/image-editor-hooks;22538
which makes sense, since the entire point is that
'wp_image_editor_instance' gives you more control over the process than
'wp_image_editor_class'.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22538#comment:24>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list