Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2012 09:55:56 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Revert r6587:

  • Introduce bp_get_email_subject() function, to handle formatting of email subjects.
  • For all components with notifications, including deprecated files.
  • Fixes #4401, better this time.
File:
1 edited

Legend:

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

    r6587 r6589  
    1717
    1818    $group    = groups_get_group( array( 'group_id' => $group_id ) );
    19     $sitename = bp_get_option( 'blogname', 'WordPress' );
    20     $subject  = '[' . $sitename . '] ' . __( 'Group Details Updated', 'buddypress' );
    21 
     19    $subject  = bp_get_email_subject( array( 'text' => __( 'Group Details Updated', 'buddypress' ) ) );
    2220    $user_ids = BP_Groups_Member::get_group_member_ids( $group->id );
     21
    2322    foreach ( (array) $user_ids as $user_id ) {
    2423        if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_group_updated', true ) ) continue;
     
    7473    // Set up and send the message
    7574    $to       = $ud->user_email;
    76     $sitename = bp_get_option( 'blogname', 'WordPress' );
    77     $subject  = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
     75    $subject  = bp_get_email_subject( array( 'text' => sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name ) ) );
    7876
    7977$message = sprintf( __(
     
    123121    // Set up and send the message
    124122    $to       = $ud->user_email;
    125     $sitename = bp_get_option( 'blogname', 'WordPress' );
    126123
    127124    if ( $accepted ) {
    128         $subject = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
     125        $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name ) ) );
    129126        $message = sprintf( __(
    130127'Your membership request for the group "%1$s" has been accepted.
     
    136133
    137134    } else {
    138         $subject = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
     135        $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name ) ) );
    139136        $message = sprintf( __(
    140137'Your membership request for the group "%1$s" has been rejected.
     
    182179    // Set up and send the message
    183180    $to       = $ud->user_email;
    184     $sitename = bp_get_option( 'blogname', 'WordPress' );
    185     $subject  = '[' . $sitename . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
    186 
    187     $message = sprintf( __(
     181    $subject  = bp_get_email_subject( array( 'text' => sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name ) ) );
     182    $message  = sprintf( __(
    188183'You have been promoted to %1$s for the group: "%2$s".
    189184
     
    232227        // Set up and send the message
    233228        $to       = $invited_ud->user_email;
    234         $sitename = bp_get_option( 'blogname', 'WordPress' );
    235         $subject  = '[' . $sitename . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
     229        $subject  = bp_get_email_subject( array( 'text' => sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name ) ) );
    236230
    237231        $message = sprintf( __(
Note: See TracChangeset for help on using the changeset viewer.