Go to file
Mike Schroder ffb2db0521 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@38113 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 07:34:54 +00:00
src Media: Clean up prior image edits if `IMAGE_EDIT_OVERWRITE` is true. 2016-07-20 07:34:54 +00:00
tests Media: Clean up prior image edits if `IMAGE_EDIT_OVERWRITE` is true. 2016-07-20 07:34:54 +00:00
tools/i18n DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:49:09 +00:00
.editorconfig
.gitignore Remove accidental .svn addition to .gitignore 2015-12-12 18:26:22 +00:00
.jshintrc Build: Prevent non-breaking spaces from accidentally being inserted into JavaScript files. 2015-11-12 12:04:55 +00:00
.travis.yml Output node and npm versions on travis 2016-06-16 17:27:22 +00:00
Gruntfile.js Grunt: when running `precommit` use regex to check which files have been modified. 2016-06-19 12:31:15 +00:00
package.json Tools: Update `grunt-patch-wordpress` to 0.4.2. 2016-07-20 06:48:26 +00:00
phpunit.xml.dist Set a whitelist for PHPUnit code coverage. 2016-05-17 20:22:57 +00:00
wp-cli.yml Remove debug mode from WP-CLI by default, as it now outputs too much debugging information to be of use during normal development. 2015-11-28 18:36:06 +00:00
wp-config-sample.php
wp-tests-config-sample.php Unit Tests: Correct comment in `wp-tests-config-sample.php`. 2016-01-21 20:24:12 +00:00