0

My plugin allows for some custom templates to be installed into it by the user. Problem is, if someone deletes the plugin from WP in order to install a new version, all their custom files get deleted as well.

Is there a way to catch deletion and fire an alert warning the user of this, before they delete?

Oh and putting their templates into the DB is not an acceptable option.

1

Consider using an external directory to store such dependencies for your scenario like WP_CONTENT_DIR.'/plugin-templates' (other then your real plugin folder) or smth. And allow users to remove it manually when they really want to uninstall.

I don't think you should delete plugins to update them... BUT I NEVER USED THE DEFAULT UPDATER (I disable it intentionally) so I don't even know how it works.

Regards.

  • Yeah I don't recommend users delete in order to install, but I already know from some of my beta users that some people will do exactly that, so I'm trying to prepare for the inevitable. :) Thanks for the suggestion, I may have to go that route. – Jonathan van Clute Nov 2 '11 at 16:58

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.