monsterinsights_get_license_key

Helper method for getting the license key.

Description

(string) monsterinsights_get_license_key(); 

Returns (string)

The value of the setting.


Usage

  1. if ( !function_exists( 'monsterinsights_get_license_key' ) ) { 
  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_key(); 
  7.  

Defined (1)

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

/includes/options.php  
  1. function monsterinsights_get_license_key() { 
  2. $license = false; 
  3. if ( defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) { 
  4. $license = MONSTERINSIGHTS_LICENSE_KEY; 
  5. } else { 
  6. if ( ! empty( $license['key'] ) && is_string( $license['key'] ) && strlen( $license['key'] ) > 10 ) { 
  7. $license = $license['key']; 
  8. } else { 
  9. $license = false; 
  10.  
  11. return apply_filters( 'monsterinsights_license_key', $license );