Skip to:
Content

BuddyPress.org

Changeset 9163


Ignore:
Timestamp:
11/21/2014 09:45:35 PM (10 years ago)
Author:
boonebgorges
Message:

Include message in email notification of private group membership request.

Fixes #5885.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-notifications.php

    r9027 r9163  
    112112    $settings_link  = bp_core_get_user_domain( $admin_id ) . $settings_slug . '/notifications/';
    113113
     114    // Fetch the message, if there's one to fetch.
     115    $membership = new BP_Groups_Member( false, false, $membership_id );
     116
    114117    // Set up and send the message
    115118    $to       = $ud->user_email;
    116119    $subject  = bp_get_email_subject( array( 'text' => sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name ) ) );
    117120
    118 $message = sprintf( __(
     121    if ( ! empty( $membership->comments ) ) {
     122        $message = sprintf( __(
     123'%1$s wants to join the group "%2$s".
     124
     125Message from %1$s: "%3$s"
     126
     127Because you are the administrator of this group, you must either accept or reject the membership request.
     128
     129To view all pending membership requests for this group, please visit:
     130%4$s
     131
     132To view %5$s\'s profile: %6$s
     133
     134---------------------
     135', 'buddypress' ), $requesting_user_name, $group->name, esc_html( $membership->comments ), $group_requests, $requesting_user_name, $profile_link );
     136
     137    } else {
     138
     139        $message = sprintf( __(
    119140'%1$s wants to join the group "%2$s".
    120141
     
    128149---------------------
    129150', 'buddypress' ), $requesting_user_name, $group->name, $group_requests, $requesting_user_name, $profile_link );
     151    }
    130152
    131153    // Only show the disable notifications line if the settings component is enabled
Note: See TracChangeset for help on using the changeset viewer.