monsterinsights_is_pro_version

Is This MonsterInsights Pro?.

Description

monsterinsights_is_pro_version(); 

We use this function monsterinsights_to determine if the install is a pro version or a lite version install of MonsterInsights. If the install is a lite version we disable the install from admin functionality[1] for addons as WordPress.org requires us to, we change the links for where to get support (wp.org forum for free; our site for pro), we use this determine what class to load as the base class in addons (to avoid fatal errors) and we use this on the system info page to know what constants to display values for as the lite and pro versions of our plugin have different constants (and names for those constants) you can declare and use.

[1] Note: This is not feature-locking under GPL guidelines but rather something WordPress.org requires us to do to stay in compliance with their rules. We wish we didn't have to do this, as in our oppinion this diminishes the user experience of users installing our free and premium addons, and we'd love to turn this on for non-Pro installs, but we're not allowed to. If WordPress.org ever changes their mind on this subject, we'd totally turn on that feature for Lite installs in a heartbeat.


Usage

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

Defined (1)

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

/includes/helpers.php  
  1. function monsterinsights_is_pro_version() { 
  2. if ( class_exists( 'MonsterInsights' ) ) { 
  3. return true; 
  4. } else { 
  5. return false;