mansj / enable-media-replace

***DEVELOPMENT DISCONTINUED*** Enable Media Replace, a WordPress plugin to make it possible to replace uploaded media files in a simple way.
GNU General Public License v2.0
28 stars 27 forks source link

Make the "upload done" hook more useful #29

Closed speerface closed 7 years ago

speerface commented 7 years ago

As it is now, the "upload done" hook that fires after the replacement has occurred is not particularly useful as it only sends along the new guid. If, for instance, a user wants to hook in and perform a search/replace against additional tables, they don't have the original guid from which to work.

This simply passes the current guid along with the new guid. It also removes the ternary operator that was checking for the new guid, as the hook is already wrapped in an isset() conditional that should handle that already.