pmpro_showRequiresMembershipMessage

The Paid Memberships Pro pmpro showRequiresMembershipMessage function.

Description

pmpro_showRequiresMembershipMessage(); 

Usage

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

Defined (1)

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

/includes/functions.php  
  1. function pmpro_showRequiresMembershipMessage() 
  2. //TODO $current_user $post_membership_levels_names are undefined variables 
  3. //get the correct message 
  4. if(is_feed()) 
  5. $content = pmpro_getOption("rsstext"); 
  6. $content = str_replace("!!levels!!", implode(", ", $post_membership_levels_names), $content); 
  7. elseif($current_user->ID) 
  8. //not a member 
  9. $content = pmpro_getOption("nonmembertext"); 
  10. $content = str_replace("!!levels!!", implode(", ", $post_membership_levels_names), $content); 
  11. else 
  12. //not logged in! 
  13. $content = pmpro_getOption("notloggedintext"); 
  14. $content = str_replace("!!levels!!", implode(", ", $post_membership_levels_names), $content);