mansj/enable-media-replace — pull request #5 by jeremyfelt (2014-06-03 22:52:15+00:00)
Title: [PR] Add filters and actions for customization of plugin options

I took some liberties here in naming just to get some options on the table. Very much happy to continue adjusting this pull request to meet @mansj's thoughts on how this could go.

* The action `emr_before_replace_type_options` fires before options are output in `popup.php`. This allows for custom functionality and/or messaging to happen before the options are displayed.
* The filter `emr_display_replace_type_options` defaults to true and can be set to false to disable to the display of options completely.
* The filter `emr_enable_replace_and_search` defaults to true and can be set to false to disable only the replace and search option. This is the one I'm least certain about offering. :)
* The handling of the submission in `upload.php` now checks for a specific action of `replace_and_search` rather than defaulting to else. There **could** have been a case before where another action was POSTed and handled as if it was `replace_and_search`.

Thanks for this plugin, @mansj!