extending wp image editor – am I doing it wrong?
-
In the EWWW Image Editor plugin, I’ve extended the GD, Imagick, and Gmagick classes for WP_Image_Editor with my own classes:
EWWWIO_GD_Editor
EWWWIO_Gmagick_Editor
EWWWIO_Imagick_EditorThe intent is to reuse as much of the existing methods as possible. As such, they each contain one and only one method: _save. This method is pretty much identical to the parent class, except it hooks in the optimizations for the plugin. My understanding was that WP and other themes/plugins should be able to fallback to the parent class automatically for methods not in my child classes.
Is that correct, or should I have implemented every method available (as some sort of call to the parent class methods)?
@dh-shredder – any chance you could take a look?
- The topic ‘extending wp image editor – am I doing it wrong?’ is closed to new replies.