[wp-hackers] Uninstalling a plugin but keeping its options
Helen Hou-Sandi
helen.y.hou at gmail.com
Fri Sep 9 16:54:27 UTC 2011
Do you mean that you're removing the options when you delete it or when you
deactivate it? A single site can deactivate, not delete.
--
Helen Hou-Sandi
http://www.helenhousandi.com
On Fri, Sep 9, 2011 at 11:51 AM, Dino Termini <dino at duechiacchiere.it>wrote:
> Hi all,
>
> as I was saying in a previous message, I've developed a plugin that works
> in multisite environments. Following Otto's advice, I'm using
> add_site_option to store general (default) options that apply to all the
> blogs in the network.
>
> Let's say this plugin is not installed network-wide, but just on some blogs
> in the network. The activation process will still initialize the general
> options, which is okay.
>
> My plugin is programmed, of course, to remove all the options when
> uninstalled. But if blog A uninstalls it, and blog B doesn't, the former
> will cause the general options to be deleted from the database, thus
> creating an inconsistency.
>
> How can I make sure to remove those options only when no other blogs have
> my plugin installed/active?
>
> Thank you,
> Dino
>
>
> ______________________________**_________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>
More information about the wp-hackers
mailing list