groups_promoted_member

  • do_action( 'groups_promoted_member', $user_id, $bp->groups->current_group->id )

    Source Reference:

    • Component: BuddyPress:: bp-groups
      File: /bp-groups/bp-groups-screens.php :: Trac Source Line: 629
      				if ( !check_admin_referer( 'groups_promote_member' ) )
      					return false;
      
      				// Promote a user.
      				if ( !groups_promote_member( $user_id, $bp->groups->current_group->id, $status ) )
      					bp_core_add_message( __( 'There was an error when promoting that user, please try again', 'buddypress' ), 'error' );
      				else
      					bp_core_add_message( __( 'User promoted successfully', 'buddypress' ) );
      
      				do_action( 'groups_promoted_member', $user_id, $bp->groups->current_group->id );
      
      				bp_core_redirect( bp_get_group_permalink( groups_get_current_group() ) . 'admin/manage-members/' );
      			}
      		}
      
      		if ( bp_action_variable( 1 ) && bp_action_variable( 2 ) ) {
      			if ( bp_is_action_variable( 'demote', 1 ) && is_numeric( bp_action_variable( 2 ) ) ) {
      				$user_id = bp_action_variable( 2 );
      
      				// Check the nonce first.
      

Hook: add_action: groups_promoted_member instances (1)

  • add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 )
    $function_to_add: groups_notification_promoted_member
    $priority: 10
    $accepted_args: 2

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-notifications.php :: Trac Source Line: 198
      	/* Send the message */
      	$to      = apply_filters( 'groups_notification_promoted_member_to', $to );
      	$subject = apply_filters_ref_array( 'groups_notification_promoted_member_subject', array( $subject, &$group ) );
      	$message = apply_filters_ref_array( 'groups_notification_promoted_member_message', array( $message, &$group, $promoted_to, $group_link, $settings_link ) );
      
      	wp_mail( $to, $subject, $message );
      
      	do_action( 'bp_groups_sent_promoted_email', $user_id, $subject, $message, $group_id );
      }
      add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );
      
      function groups_notification_group_invites( &$group, &$member, $inviter_user_id ) {
      	global $bp;
      
      	$inviter_ud = bp_core_get_core_userdata( $inviter_user_id );
      	$inviter_name = bp_core_get_userlink( $inviter_user_id, true, false, true );
      	$inviter_link = bp_core_get_user_domain( $inviter_user_id );
      
      	$group_link = bp_get_group_permalink( $group );
      

Comments are closed.