0

I'm about to finish my first plugin which give the users the possibility to mark their posts on an interactive map (great for travelers' blogs).

The plugin uses :

  • Post Metadata to store the latitude / longitude / marker image
  • Custom private taxonomy to retrieve the posts with markers
  • Custom post type for user custom markers

I already know how to remove everything from the database when uninstall.php is triggered, but I want to give the user the possibility to keep all these informations.

How can I do that ? Is there a way to open an alert when the user click the uninstall link in plugin directory, and give him a choice ? Or to change the "Delete" link to two links, "Delete and erase every data in the database" and "Delete files only, markers data will not be deleted."

If not, do you have any advice on what to do in that case ?

Thank you :)

  • 1
    Take a look at how the user delete process works. It gives you the option to associate posts to another user before the delete process is complete. It's a good pattern to follow. You can't impeded the uninstall plugin process, so you'll have to look for another way to accomplish this. – MikeNGarrett May 14 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.