[wp-hackers] Uninstalling a plugin but keeping its options
Dino Termini
dino at duechiacchiere.it
Fri Sep 9 16:51:02 UTC 2011
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
More information about the wp-hackers
mailing list