$network_wide parameter always ” in registered activation hook function
-
Hello,
In my plugin code I am registering my activation and deactivation hook functions, each with the $network_wide parameter as this is intended to be a multisite plugin.
function my_activation_hook($network_wide) { if ($network_wide) { //do something on all sites } else { //do something on current site } } function my_deactivation_hook($network_wide) { if ($network_wide) { //do something on all sites } else { //do something on current site } } register_activation_hook(__FILE__, 'my_activation_hook'); register_deactivation_hook(__FILE__, 'my_deactivation_hook');
In the deactivation hook the $network_wide parameter is passed as expected i.e. boolean true when network deactivated and boolean false when deactivated on a site. However, in the activation hook, the parameter is always a blank string ”. Has anyone else experienced this? I have tried this on multiple installations (windows and linux) and it seems consistent in the 4.9.4 version at least.
Thanks,
Asif
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘$network_wide parameter always ” in registered activation hook function’ is closed to new replies.