M_ping_joinedlevel

Do_action( 'membership_add_level', $tolevel_id, $this->ID ); do_action( 'membership_drop_level', $fromlevel_id, $this->ID ); do_action( 'membership_move_level', $fromlevel_id, $tolevel_id, $this->ID );.

Description

M_ping_joinedlevel( $tolevel_id, $user_id ); 

do_action( membership_add_subscription,, $tosub_id, $tolevel_id, $to_order, $this->ID); do_action( membership_drop_subscription, $fromsub_id, $this->ID ); do_action( membership_move_subscription, $fromsub_id, $tosub_id, $tolevel_id, $to_order, $this->ID );

Parameters (2)

0. $tolevel_id
The tolevel id.
1. $user_id
The user id.

Usage

  1. if ( !function_exists( 'M_ping_joinedlevel' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/classes/class.ping.php'; 
  3.  
  4. // The tolevel id. 
  5. $tolevel_id = null; 
  6.  
  7. // The user id. 
  8. $user_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = M_ping_joinedlevel($tolevel_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_joinedlevel( $tolevel_id, $user_id ) { 
  2.  
  3. // Set up the level and find out if it has a joining ping 
  4. $level = new M_Level( $tolevel_id ); 
  5.  
  6. $joiningping_id = $level->get_meta( 'joining_ping' ); 
  7. if(!empty($joiningping_id)) { 
  8. $ping = new M_Ping( $joiningping_id ); 
  9.  
  10. $ping->send_ping( false, $tolevel_id, $user_id ); 
  11.  
  12.