pmpro_setMessage

The Paid Memberships Pro pmpro setMessage function.

Description

pmpro_setMessage( $message, $type, (constant) $force = false ); 

Parameters (3)

0. $message
The message.
1. $type
The type.
2. $force — Optional. (constant) => false
The force.

Usage

  1. if ( !function_exists( 'pmpro_setMessage' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/functions.php'; 
  3.  
  4. // The message. 
  5. $message = null; 
  6.  
  7. // The type. 
  8. $type = null; 
  9.  
  10. // The force. 
  11. $force = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = pmpro_setMessage($message, $type, $force); 
  15.  

Defined (1)

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

/includes/functions.php  
  1. function pmpro_setMessage($message, $type, $force = false) 
  2. global $pmpro_msg, $pmpro_msgt; 
  3.  
  4. //for now, we only show the first message generated 
  5. if($force || empty($pmpro_msg)) 
  6. $pmpro_msg = apply_filters('pmpro_set_message', $message, $type); 
  7. $pmpro_msgt = $type;