Changeset 6589
- Timestamp:
- 12/10/2012 09:55:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-notifications.php
r6587 r6589 71 71 $ud = bp_core_get_core_userdata( $receiver_user_id ); 72 72 $to = $ud->user_email; 73 $sitename = bp_get_option( 'blogname', 'WordPress' ); 74 $subject = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name ); 73 $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name ) ) ); 75 74 76 75 if ( bp_is_active( 'groups' ) && bp_is_group() ) { … … 158 157 159 158 // Set up and send the message 160 $ud = bp_core_get_core_userdata( $original_activity->user_id ); 161 $to = $ud->user_email; 162 $sitename = bp_get_option( 'blogname', 'WordPress' ); 163 $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name ); 164 165 $message = sprintf( __( 159 $ud = bp_core_get_core_userdata( $original_activity->user_id ); 160 $to = $ud->user_email; 161 $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name ) ) ); 162 $message = sprintf( __( 166 163 '%1$s replied to one of your updates: 167 164 … … 203 200 $ud = bp_core_get_core_userdata( $parent_comment->user_id ); 204 201 $to = $ud->user_email; 205 $sitename = bp_get_option( 'blogname', 'WordPress' ); 206 $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name ); 202 $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name ) ) ); 207 203 208 204 $poster_name = stripslashes( $poster_name ); -
trunk/bp-core/bp-core-filters.php
r6587 r6589 256 256 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 257 257 $message = sprintf( __( "Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%1\$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%2\$s", 'buddypress' ), $activate_url, esc_url( "http://{$domain}{$path}" ) ); 258 $subject = '[' . $from_name . '] ' . sprintf(__( 'Activate %s', 'buddypress' ), esc_url( 'http://' . $domain . $path) );258 $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Activate %s', 'buddypress' ), 'http://' . $domain . $path ) ) ); 259 259 260 260 // Send the message … … 284 284 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 285 285 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url ); 286 $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress');286 $subject = bp_get_email_subject( array( 'text' => __( 'Activate Your Account', 'buddypress' ) ) ); 287 287 288 288 // Send the message -
trunk/bp-core/bp-core-template.php
r6512 r6589 540 540 541 541 /** 542 * Retrieve a client friendly version of the root blog name, plus take care of 543 * the typical formatting bits and bobs. 544 * 545 * The blogname option is escaped with esc_html on the way into the database in 546 * sanitize_option, we want to reverse this for the plain text arena of emails. 547 * 548 * @link http://buddypress.trac.wordpress.org/ticket/4401 549 * @since BuddyPress (1.7) 550 * @return string 551 */ 552 function bp_get_email_subject( $args = array() ) { 553 554 $r = wp_parse_args( $args, array( 555 'before' => '[', 556 'after' => ']', 557 'default' => __( 'Community', 'buddypress' ), 558 'text' => '' 559 ) ); 560 561 $subject = $r['before'] . wp_specialchars_decode( bp_get_option( 'blogname', $default ), ENT_QUOTES ) . $r['after'] . ' ' . $r['text']; 562 563 return apply_filters( 'bp_get_email_subject', $subject, $r ); 564 } 565 566 /** 542 567 * Allow templates to pass parameters directly into the template loops via AJAX 543 568 * -
trunk/bp-core/deprecated/1.5.php
r6587 r6589 350 350 $ud = bp_core_get_core_userdata( $receiver_user_id ); 351 351 $to = $ud->user_email; 352 $sitename = bp_get_option( 'blogname', 'WordPress' ); 353 $subject = '[' . $sitename . '] ' . sprintf( __( '%1$s mentioned you in the group "%2$s"', 'buddypress' ), $poster_name, $group->name ); 352 $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%1$s mentioned you in the group "%2$s"', 'buddypress' ), $poster_name, $group->name ) ) ); 354 353 355 354 $message = sprintf( __( -
trunk/bp-friends/bp-friends-notifications.php
r6587 r6589 29 29 // Set up and send the message 30 30 $to = $ud->user_email; 31 $sitename = bp_get_option( 'blogname', 'WordPress' ); 32 $subject = '[' . $sitename . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name ); 33 34 $message = sprintf( __( 31 $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name ) ) ); 32 $message = sprintf( __( 35 33 '%1$s wants to add you as a friend. 36 34 … … 68 66 // Set up and send the message 69 67 $to = $ud->user_email; 70 $sitename = bp_get_option( 'blogname', 'WordPress' ); 71 $subject = '[' . $sitename . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name ); 72 73 $message = sprintf( __( 68 $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name ) ) ); 69 $message = sprintf( __( 74 70 '%1$s accepted your friend request. 75 71 -
trunk/bp-groups/bp-groups-notifications.php
r6587 r6589 17 17 18 18 $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' ) ) ); 22 20 $user_ids = BP_Groups_Member::get_group_member_ids( $group->id ); 21 23 22 foreach ( (array) $user_ids as $user_id ) { 24 23 if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_group_updated', true ) ) continue; … … 74 73 // Set up and send the message 75 74 $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 ) ) ); 78 76 79 77 $message = sprintf( __( … … 123 121 // Set up and send the message 124 122 $to = $ud->user_email; 125 $sitename = bp_get_option( 'blogname', 'WordPress' );126 123 127 124 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 ) ) ); 129 126 $message = sprintf( __( 130 127 'Your membership request for the group "%1$s" has been accepted. … … 136 133 137 134 } 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 ) ) ); 139 136 $message = sprintf( __( 140 137 'Your membership request for the group "%1$s" has been rejected. … … 182 179 // Set up and send the message 183 180 $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( __( 188 183 'You have been promoted to %1$s for the group: "%2$s". 189 184 … … 232 227 // Set up and send the message 233 228 $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 ) ) ); 236 230 237 231 $message = sprintf( __( -
trunk/bp-members/bp-members-functions.php
r6587 r6589 1340 1340 $activate_url = esc_url( $activate_url ); 1341 1341 1342 $from_name = bp_get_option( 'blogname', 'WordPress' );1343 1344 1342 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url ); 1345 $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress');1343 $subject = bp_get_email_subject( array( 'text' => __( 'Activate Your Account', 'buddypress' ) ) ); 1346 1344 1347 1345 // Send the message -
trunk/bp-messages/bp-messages-notifications.php
r6587 r6589 48 48 // Set up and send the message 49 49 $email_to = $ud->user_email; 50 $sitename = bp_get_option( 'blogname', 'WordPress' ); 51 $email_subject = '[' . $sitename . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name ); 50 $email_subject = bp_get_email_subject( array( 'text' => sprintf( __( 'New message from %s', 'buddypress' ), $sender_name ) ) ); 52 51 53 52 $email_content = sprintf( __(
Note: See TracChangeset
for help on using the changeset viewer.