pmpro_getLevelExpiration

The Paid Memberships Pro pmpro getLevelExpiration function.

Description

pmpro_getLevelExpiration( &$level ); 

Parameters (1)

0. $level
The level.

Usage

  1. if ( !function_exists( 'pmpro_getLevelExpiration' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/functions.php'; 
  3.  
  4. // The level. 
  5. $level = &$level; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pmpro_getLevelExpiration($level); 
  9.  

Defined (1)

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

/includes/functions.php  
  1. function pmpro_getLevelExpiration(&$level) 
  2. if($level->expiration_number) 
  3. $expiration_text = sprintf(__("Membership expires after %d %s.", 'paid-memberships-pro' ), $level->expiration_number, pmpro_translate_billing_period($level->expiration_period, $level->expiration_number)); 
  4. else 
  5. $expiration_text = ""; 
  6.  
  7. $expiration_text = apply_filters("pmpro_levels_expiration_text", $expiration_text, $level); 
  8. $expiration_text = apply_filters("pmpro_level_expiration_text", $expiration_text, $level); // Backwards compatible 
  9. return $expiration_text;