Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2021 04:14:25 PM (3 years ago)
Author:
dcavins
Message:

Add key membership request functionality.

When membership requests are active, interrupt the
activation process by not sending the activation mail
upon submission of the registration form. This allows the
site admin an opportunity to look over the request and
send the activation email manually.

See #8582.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-members-component.php

    r13144 r13167  
    4141                'adminbar_myaccount_order' => 20,
    4242                'search_query_arg'         => 'members_search',
    43                 'features'                 => array( 'invitations' )
     43                'features'                 => array( 'invitations', 'membership_requests' ),
    4444            )
    4545        );
     
    7373        if ( bp_is_active( 'activity' ) ) {
    7474            $includes[] = 'activity';
     75        }
     76
     77        /**
     78         * Duplicate bp_get_membership_requests_required() and
     79         * bp_get_signup_allowed() logic here,
     80         * because those functions are not available yet.
     81         * The `bp_get_signup_allowed` filter is documented in
     82         * bp-members/bp-members-template.php.
     83         */
     84        $signup_allowed = apply_filters( 'bp_get_signup_allowed', (bool) bp_get_option( 'users_can_register' ) );
     85        $membership_requests_enabled = (bool) bp_get_option( 'bp-enable-membership-requests' );
     86        if ( bp_is_active( 'members', 'membership_requests' ) && ! $signup_allowed && $membership_requests_enabled ) {
     87            $includes[] = 'membership-requests';
    7588        }
    7689
Note: See TracChangeset for help on using the changeset viewer.