monsterinsights_lite_deactivation_hook

Fired when the plugin is deactivation.

Description

monsterinsights_lite_deactivation_hook( $network_wide ); 

Parameters (1)

0. $network_wide
The network wide.

Usage

  1. if ( !function_exists( 'monsterinsights_lite_deactivation_hook' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/googleanalytics.php'; 
  3.  
  4. // The network wide. 
  5. $network_wide = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = monsterinsights_lite_deactivation_hook($network_wide); 
  9.  

Defined (1)

The function is defined in the following location(s).

/googleanalytics.php  
  1. function monsterinsights_lite_deactivation_hook( $network_wide ) { 
  2. // Note, if both MI Pro and Lite are active, this is an MI Pro instance 
  3. // Therefore MI Lite can only use functions of the instance common to 
  4. // both plugins. If it needs to be pro specific, then include a file that 
  5. // has that method. 
  6. $instance = MonsterInsights(); 
  7.  
  8. if ( is_multisite() && $network_wide ) { 
  9. $site_list = get_sites(); 
  10. $options = array( 
  11. 'cron_failed',  
  12. 'cron_last_run',  
  13. ); 
  14.  
  15. foreach ( (array) $site_list as $site ) { 
  16. switch_to_blog( $site->blog_id ); 
  17. restore_current_blog(); 
  18. } else { 
  19. $options = array( 
  20. 'cron_failed',  
  21. 'cron_last_run',  
  22. );