You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an extension is deactivated, an action is fired that the extension can hook into to run certain code on deactivation. For example, it is common practice to deregister any cron jobs on deactivation, since they don't need to run and the callback function won't be loaded. These jobs then need to be registered again on reactivation.
However, when WordPoints itself is deactivated, the deactivation code for the extensions is not automatically triggered. The extension could hook into the plugin's deactivation action as well as it's own deactivation action. But should it really have to do that manually? Shouldn't WordPoints be responsible for triggering these actions automatically? And then shouldn't it likewise run the activation hooks for the active extensions on reactivation? (The extensions wouldn't actually be activated/deactivated, we'd just be running the actions.)
The text was updated successfully, but these errors were encountered:
The same could also be said for components, especially since they are mainly internal to begin with. However, the core components are not actually hooking into their de/activation at all right now, so the point is largely moot at the moment.
Instead just use a filter that we introduce (
`'is_wordpoints_extension_active`).
This is better, because the deactivation only takes care of the current
site on multisite anyway.
It also avoids having to call `is_wordpoints_network_active()` within or
triggered by that function, which is unreliable during uninstall.
See #399, #712
When an extension is deactivated, an action is fired that the extension can hook into to run certain code on deactivation. For example, it is common practice to deregister any cron jobs on deactivation, since they don't need to run and the callback function won't be loaded. These jobs then need to be registered again on reactivation.
However, when WordPoints itself is deactivated, the deactivation code for the extensions is not automatically triggered. The extension could hook into the plugin's deactivation action as well as it's own deactivation action. But should it really have to do that manually? Shouldn't WordPoints be responsible for triggering these actions automatically? And then shouldn't it likewise run the activation hooks for the active extensions on reactivation? (The extensions wouldn't actually be activated/deactivated, we'd just be running the actions.)
The text was updated successfully, but these errors were encountered: