bp_get_members_invitation_from_request()
Get the current invitation specified by the $_GET parameters.
Return Return
(BP_Invitation) $invite Invitation specified by the $_GET parameters.
Source Source
File: bp-members/bp-members-functions.php
function bp_get_members_invitation_from_request() { $invites_class = new BP_Members_Invitation_Manager(); $invite = $invites_class->get_by_id( 0 ); if ( bp_get_members_invitations_allowed() && ! empty( $_GET['inv'] ) ) { // Check to make sure the passed hash matches a calculated hash. $maybe_invite = $invites_class->get_by_id( absint( $_GET['inv'] ) ); $hash = bp_members_invitations_get_hash( $maybe_invite ); if ( $_GET['ih'] === $hash ) { $invite = $maybe_invite; } } /** * Filters the invitation specified by the $_GET parameters. * * @since 8.0.0 * * @param BP_Invitation $invite Invitation specified by the $_GET parameters. */ return apply_filters( 'bp_get_members_invitation_from_request', $invite ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
8.0.0 | Introduced. |