-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring back a weird approvals.php missing file
* Just bringing back some missing files from SVN for Approvals.
- Loading branch information
1 parent
6cfa2e1
commit 8515fd1
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* PMPro Approvals support. | ||
*/ | ||
|
||
/** | ||
* Reset groups and member types when a user is approved. | ||
*/ | ||
function pmpro_bp_pmpro_approvals_after_approve_member( $user_id, $level_id ) { | ||
pmpro_bp_set_member_groups( $level_id, $user_id, NULL ); | ||
pmpro_bp_set_member_types( $level_id, $user_id, NULL ); | ||
} | ||
add_action( 'pmpro_approvals_after_approve_member', 'pmpro_bp_pmpro_approvals_after_approve_member', 10, 2 ); | ||
|
||
/** | ||
* Reset groups and member types when a user is denied or reset. | ||
*/ | ||
function pmpro_bp_pmpro_approvals_after_deny_member( $user_id, $level_id ) { | ||
pmpro_bp_set_member_groups( $level_id, $user_id, $level_id ); | ||
pmpro_bp_set_member_types( $level_id, $user_id, $level_id ); | ||
} | ||
add_action( 'pmpro_approvals_after_deny_member', 'pmpro_bp_pmpro_approvals_after_deny_member', 10, 2 ); | ||
add_action( 'pmpro_approvals_after_reset_member', 'pmpro_bp_pmpro_approvals_after_deny_member', 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters