Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #46777, comment 3


Ignore:
Timestamp:
04/13/2019 09:43:32 AM (6 years ago)
Author:
arkimedia
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #46777, comment 3

    initial v1  
    11I'm building a plugin which allows admins to select a focal point of an image. Plugin stores focal point data to attachment metadata and uses `image_resize_dimensions` filter to calculate best cropping area for each image size.
    22
    3 Currently I've used a editor subclass, but filter would be better alternative, because it makes possible to implement solution that works whit every image editor class.
     3Currently I've used a editor subclass, but filter would be better alternative, because it makes possible to implement solution that works with every image editor class.
    44
    55And even I'd use subclass, currently the attachment ID won't get passed to the `multi_resize` method of the image editor class, so I have to resolve the ID from the image path, which has some performance downsides. https://github.com/WordPress/WordPress/blob/71cf332e6569f0ac2f263ce9b2168644942f5534/wp-admin/includes/image.php#L145