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.
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.
emr_before_replace_type_options
fires before options are output inpopup.php
. This allows for custom functionality and/or messaging to happen before the options are displayed.emr_display_replace_type_options
defaults to true and can be set to false to disable to the display of options completely.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. :)upload.php
now checks for a specific action ofreplace_and_search
rather than defaulting to else. There could have been a case before where another action was POSTed and handled as if it wasreplace_and_search
.Thanks for this plugin, @mansj!