Closed crstauf closed 11 months ago
This is an interesting use case. If QM is active on one site on the network and I deactivate it on that site, I would expect the db.php file to be deleted too as it's no longer needed, but it might be active on another site on the network.
I don't want to introduce code to check the active status on all sites on the network because that's a mess. I think QM should not delete the db.php
file when it's deactivated on a single site on the network. The file is harmless when QM isn't active anyway.
It's surprising that there aren't separate functions for network de/activations.
It's surprising that there aren't separate functions for network de/activations.
I believe that whether it's network or not is passed in action calls: https://developer.wordpress.org/reference/hooks/activate_plugin/
However, I don't think that helps a ton, because of the following situation:
Subsite A has Query Monitor locally activated. Then QM is network activated. Then QM is network deactivated. Subsite A still has QM locally activated, and thus, should still be using db.php
Oh, interesting. I was expecting there'd be register_network_activation_hook()
function (and similar deactivation function), but that could work.
Originally posted by @MadtownLems in https://github.com/johnbillion/query-monitor/issues/817#issuecomment-1749593575