monsterinsights_get_license

Helper method for getting the license information.

Description

(string) monsterinsights_get_license(); 

Returns (string)

The value of the setting.


Usage

  1. if ( !function_exists( 'monsterinsights_get_license' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = monsterinsights_get_license(); 
  7.  

Defined (1)

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

/includes/options.php  
  1. function monsterinsights_get_license() { 
  2. $license = false; 
  3. if ( defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) { 
  4. $license = array( 'key' => MONSTERINSIGHTS_LICENSE_KEY ); 
  5. } else if ( is_multisite() && monsterinsights_is_network_active() ) { 
  6. $network_license = get_site_option( monsterinsights_license ); 
  7. if ( ! empty( $network_license['key'] ) && is_string( $network_license['key'] ) && strlen( $network_license['key'] ) > 10 ) { 
  8. $license = $network_license; 
  9. } else { 
  10. $site_license = get_option( monsterinsights_license ); 
  11. if ( ! empty( $site_license['key'] ) && is_string( $site_license['key'] ) && strlen( $site_license['key'] ) > 10 ) { 
  12. $license = $site_license; 
  13. } else { 
  14. $site_license = get_option( monsterinsights_license ); 
  15. if ( ! empty( $site_license['key'] ) && is_string( $site_license['key'] ) && strlen( $site_license['key'] ) > 10 ) { 
  16. $license = $site_license; 
  17.  
  18. return apply_filters( monsterinsights_license, $license );