monsterinsights_delete_license_key

Helper method for deleting the license key.

Description

(boolean) monsterinsights_delete_license_key( (constant) $network = false, (bool) $override = false ); 

Returns (boolean)

True if removed, false if not.

Parameters (2)

0. $network — Optional. (constant) => false
The setting key.
1. $override — Optional. (bool) => false
The override.

Usage

  1. if ( !function_exists( 'monsterinsights_delete_license_key' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/options.php'; 
  3.  
  4. // The setting key. 
  5. $network = false; 
  6.  
  7. // The override. 
  8. $override = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = monsterinsights_delete_license_key($network, $override); 
  12.  

Defined (1)

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

/includes/options.php  
  1. function monsterinsights_delete_license_key( $network = false, $override = false ) { 
  2. if ( $network && is_multisite() && ( is_network_admin() || $override ) ) { 
  3. delete_site_option( monsterinsights_license ); 
  4. return true; 
  5. } else { 
  6. delete_option( monsterinsights_license ); 
  7. return true;