bp_member_revoke_invite_admin()
Admin revoke email invite.
Description
Source
File: bp-invites/actions/revoke-invite-admin.php
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | function bp_member_revoke_invite_admin() { global $bp ; if ( ! bp_is_invites_component() ) { return ; } if ( ! bp_is_my_profile() ) { return ; } if ( ! bp_is_get_request() ) { return ; } // Bail if not in settings. if ( ! bp_is_invites_component() || ! bp_is_current_action( 'revoke-invite-admin' ) ) { return ; } // 404 if there are any additional action variables attached if ( bp_action_variables() ) { bp_do_404(); return ; } $redirect = filter_input( INPUT_GET, 'redirect' , FILTER_VALIDATE_URL ); if ( empty ( $_GET ) ) { bp_core_add_message( __( 'You didn\'t include any email addresses!' , 'buddyboss' ), 'error' ); bp_core_redirect( $redirect ); die (); } $post_id = filter_input( INPUT_GET, 'id' , FILTER_VALIDATE_INT ); if ( isset( $post_id ) && '' !== $post_id ) { wp_delete_post( $post_id , true ); } bp_core_redirect( $redirect ); } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.