[wp-trac] [WordPress Trac] #60524: Cropping site icon should preserve attachment properties

WordPress Trac noreply at wordpress.org
Wed Feb 14 09:47:36 UTC 2024


#60524: Cropping site icon should preserve attachment properties
-------------------------------------+----------------------------
 Reporter:  afercia                  |       Owner:  rcreators
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  6.5
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  accessibility
-------------------------------------+----------------------------
Changes (by rcreators):

 * keywords:  needs-patch => has-patch needs-testing


Comment:

 Instead of working on ajax-actions.php->wp_ajax_crop_image function, I
 worked on class-wp-site-icon.php->create_attachment_object function. I
 extended create_attachment_object() function to copy original file's meta
 data, title, desc, caption and alt text and attach it to new cropped
 image.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60524#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list