get_membership_addons

The Membership 2 get membership addons function.

Description

get_membership_addons(); 

Usage

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

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function get_membership_addons() { 
  2. if ( is_dir( membership_dir('membershipincludes/addons') ) ) { 
  3. if ( $dh = opendir( membership_dir('membershipincludes/addons') ) ) { 
  4. $mem_addons = array(); 
  5. while ( ( $addon = readdir( $dh ) ) !== false ) 
  6. if ( substr( $addon, -4 ) == '.php' ) 
  7. $mem_addons[] = $addon; 
  8. closedir( $dh ); 
  9. sort( $mem_addons ); 
  10.  
  11. return apply_filters('membership_available_addons', $mem_addons); 
  12.  
  13. return false; 
  14.