M_ping_leftlevel

The Membership 2 M ping leftlevel function.

Description

M_ping_leftlevel( $fromlevel_id, $user_id ); 

Parameters (2)

0. $fromlevel_id
The fromlevel id.
1. $user_id
The user id.

Usage

  1. if ( !function_exists( 'M_ping_leftlevel' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/classes/class.ping.php'; 
  3.  
  4. // The fromlevel id. 
  5. $fromlevel_id = null; 
  6.  
  7. // The user id. 
  8. $user_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = M_ping_leftlevel($fromlevel_id, $user_id); 
  12.  

Defined (1)

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

/app_old/membershipincludes/classes/class.ping.php  
  1. function M_ping_leftlevel( $fromlevel_id, $user_id ) { 
  2.  
  3. // Set up the level and find out if it has a leaving ping 
  4. $level = new M_Level( $fromlevel_id ); 
  5.  
  6. $leavingping_id = $level->get_meta( 'leaving_ping' ); 
  7. if(!empty($leavingping_id)) { 
  8. $ping = new M_Ping( $leavingping_id ); 
  9.  
  10. $ping->send_ping( false, $fromlevel_id, $user_id ); 
  11.