M_activation_function

The Membership 2 M activation function function.

Description

M_activation_function(); 

Usage

  1. if ( !function_exists( 'M_activation_function' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/includes/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = M_activation_function(); 
  7.  

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function M_activation_function() { 
  2. // This function is called when the plugin is activated. 
  3. global $user; 
  4.  
  5. if(empty($user) || !method_exists($user, 'has_cap')) { 
  6. $user = wp_get_current_user(); 
  7.  
  8. if($user->user_login == MEMBERSHIP_MASTER_ADMIN && !$user->has_cap('membershipadmin')) { 
  9. $user->add_cap('membershipadmin');