Skip to:
Content

BuddyPress.org


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

Add membership request-related emails and notifications.

Add 'members-membership-request' email and
'membership_request_submitted' notification
which is sent to site admins when a new request
is submitted. Also add
'members-membership-request-rejected' email
which is sent to the requester when denied.

See #8582.

t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r13159 r13168  
    38133813 *
    38143814 * @since 2.5.1
     3815 * @since 10.0.0 Added members-membership-request and
     3816 *               members-membership-request-rejected email types.
    38153817 *
    38163818 * @return array
     
    39723974            /* translators: do not remove {} brackets or translate its contents. */
    39733975            'post_excerpt' => __( "{{inviter.name}} has invited you to join the site \"{{site.name}}\".\n\n{{usermessage}}\n\nTo accept your invitation, visit: {{{invite.accept_url}}}\n\nTo learn more about the site, visit: {{{site.url}}}.\nTo view {{inviter.name}}'s profile, visit: {{{inviter.url}}}", 'buddypress' ),
     3976        ),
     3977        'members-membership-request' => array(
     3978            /* translators: do not remove {} brackets or translate its contents. */
     3979            'post_title'   => __( '{{requesting-user.user_login}} would like to join {{site.name}}', 'buddypress' ),
     3980            /* translators: do not remove {} brackets or translate its contents. */
     3981            'post_content' => __( "{{requesting-user.user_login}} would like to join the site: &quot;{{site.name}}&quot;.\n\n<a href=\"{{{manage.url}}}\">Manage the request</a>.", 'buddypress' ),
     3982            /* translators: do not remove {} brackets or translate its contents. */
     3983            'post_excerpt' => __( "{{requesting-user.user_login}} would like to join the site \"{{site.name}}\".\n\nTo manage the request, visit: {{{manage.url}}}.", 'buddypress' ),
     3984        ),
     3985        'members-membership-request-rejected' => array(
     3986            /* translators: do not remove {} brackets or translate its contents. */
     3987            'post_title'   => __( 'Your request to join {{site.name}} has been declined', 'buddypress' ),
     3988            /* translators: do not remove {} brackets or translate its contents. */
     3989            'post_content' => __( "Sorry, your request to join the site &quot;{{site.name}}&quot; has been declined.", 'buddypress' ),
     3990            /* translators: do not remove {} brackets or translate its contents. */
     3991            'post_excerpt' => __( "Sorry, your request to join the site \"{{site.name}}\" has been declined.", 'buddypress' ),
    39743992        ),
    39753993    ) );
     
    41454163    );
    41464164
     4165    $members_membership_request = array(
     4166        'description'      => __( 'Someone has requested membership on this site.', 'buddypress' ),
     4167        'named_salutation' => true,
     4168        'unsubscribe'      => array(
     4169            'meta_key' => 'notification_members_membership_request',
     4170            'message'  => __( 'You will no longer receive emails when people submit requests to join this site.', 'buddypress' ),
     4171        ),
     4172    );
     4173
     4174    $members_membership_request_rejected = array(
     4175        'description'      => __( 'A site membership request has been rejected.', 'buddypress' ),
     4176        'named_salutation' => false,
     4177        'unsubscribe'      => false,
     4178    );
     4179
    41474180    $types = array(
    4148         'activity-comment'                   => $activity_comment,
    4149         'activity-comment-author'            => $activity_comment_author,
    4150         'activity-at-message'                => $activity_at_message,
    4151         'groups-at-message'                  => $groups_at_message,
    4152         'core-user-registration'             => $core_user_registration,
    4153         'core-user-registration-with-blog'   => $core_user_registration_with_blog,
    4154         'friends-request'                    => $friends_request,
    4155         'friends-request-accepted'           => $friends_request_accepted,
    4156         'groups-details-updated'             => $groups_details_updated,
    4157         'groups-invitation'                  => $groups_invitation,
    4158         'groups-member-promoted'             => $groups_member_promoted,
    4159         'groups-membership-request'          => $groups_membership_request,
    4160         'messages-unread'                    => $messages_unread,
    4161         'settings-verify-email-change'       => $settings_verify_email_change,
    4162         'groups-membership-request-accepted' => $groups_membership_request_accepted,
    4163         'groups-membership-request-rejected' => $groups_membership_request_rejected,
    4164         'core-user-activation'               => $core_user_activation,
    4165         'bp-members-invitation'              => $members_invitation,
     4181        'activity-comment'                    => $activity_comment,
     4182        'activity-comment-author'             => $activity_comment_author,
     4183        'activity-at-message'                 => $activity_at_message,
     4184        'groups-at-message'                   => $groups_at_message,
     4185        'core-user-registration'              => $core_user_registration,
     4186        'core-user-registration-with-blog'    => $core_user_registration_with_blog,
     4187        'friends-request'                     => $friends_request,
     4188        'friends-request-accepted'            => $friends_request_accepted,
     4189        'groups-details-updated'              => $groups_details_updated,
     4190        'groups-invitation'                   => $groups_invitation,
     4191        'groups-member-promoted'              => $groups_member_promoted,
     4192        'groups-membership-request'           => $groups_membership_request,
     4193        'messages-unread'                     => $messages_unread,
     4194        'settings-verify-email-change'        => $settings_verify_email_change,
     4195        'groups-membership-request-accepted'  => $groups_membership_request_accepted,
     4196        'groups-membership-request-rejected'  => $groups_membership_request_rejected,
     4197        'core-user-activation'                => $core_user_activation,
     4198        'bp-members-invitation'               => $members_invitation,
     4199        'members-membership-request'          => $members_membership_request,
     4200        'members-membership-request-rejected' => $members_membership_request_rejected,
    41664201    );
    41674202
Note: See TracChangeset for help on using the changeset viewer.