[wp-trac] [WordPress Trac] #32171: Images not removed upon restore when IMAGE_EDIT_OVERWRITE true

WordPress Trac noreply at wordpress.org
Wed Jul 20 07:34:55 UTC 2016


#32171: Images not removed upon restore when IMAGE_EDIT_OVERWRITE true
-------------------------------------------------+-------------------------
 Reporter:  bradt                                |       Owner:
     Type:  defect (bug)                         |  mikeschroder
 Priority:  normal                               |      Status:  closed
Component:  Media                                |   Milestone:  4.6
 Severity:  normal                               |     Version:  4.2.1
 Keywords:  has-patch needs-testing has-unit-    |  Resolution:  fixed
  tests                                          |     Focuses:
                                                 |  administration
-------------------------------------------------+-------------------------
Changes (by mikeschroder):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38113"]:
 {{{
 #!CommitTicketReference repository="" revision="38113"
 Media: Clean up prior image edits if `IMAGE_EDIT_OVERWRITE` is true.

 When `IMAGE_EDIT_OVERWRITE` is set to true, edited image files are
 supposed to be deleted when an image is restored to the original.

 However, when an image was edited more than once, and then restored,
 files created during previous edits were left behind.

 Fixes this behavior by updating `wp_save_image()` to clean up
 leftover images after each edit when `IMAGE_EDIT_OVERWRITE` is true.

 Props bradt, chriscct7, joemcgill.
 Fixes #32171.
 }}}

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


More information about the wp-trac mailing list