Changeset 3145 for branches/1.2/bp-groups/bp-groups-notifications.php
- Timestamp:
- 07/22/2010 11:09:28 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-groups/bp-groups-notifications.php
r2719 r3145 5 5 6 6 $group = new BP_Groups_Group( $group_id ); 7 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . __( 'Group Details Updated', 'buddypress' );7 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . __( 'Group Details Updated', 'buddypress' ); 8 8 9 9 $user_ids = BP_Groups_Member::get_group_member_ids( $group->id ); 10 10 foreach ( (array)$user_ids as $user_id ) { 11 if ( 'no' == get_user meta( $user_id, 'notification_groups_group_updated') ) continue;11 if ( 'no' == get_user_meta( $user_id, 'notification_groups_group_updated', true ) ) continue; 12 12 13 13 $ud = bp_core_get_core_userdata( $user_id ); … … 45 45 bp_core_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id ); 46 46 47 if ( 'no' == get_user meta( $admin_id, 'notification_groups_membership_request') )47 if ( 'no' == get_user_meta( $admin_id, 'notification_groups_membership_request', true ) ) 48 48 return false; 49 49 … … 60 60 // Set up and send the message 61 61 $to = $ud->user_email; 62 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );62 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name ); 63 63 64 64 $message = sprintf( __( … … 94 94 bp_core_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' ); 95 95 96 if ( 'no' == get_user meta( $requesting_user_id, 'notification_membership_request_completed') )96 if ( 'no' == get_user_meta( $requesting_user_id, 'notification_membership_request_completed', true ) ) 97 97 return false; 98 98 … … 108 108 109 109 if ( $accepted ) { 110 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );110 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name ); 111 111 $message = sprintf( __( 112 112 'Your membership request for the group "%s" has been accepted. … … 118 118 119 119 } else { 120 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );120 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name ); 121 121 $message = sprintf( __( 122 122 'Your membership request for the group "%s" has been rejected. … … 152 152 bp_core_add_notification( $group_id, $user_id, 'groups', $type ); 153 153 154 if ( 'no' == get_user meta( $user_id, 'notification_groups_admin_promotion') )154 if ( 'no' == get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) ) 155 155 return false; 156 156 … … 164 164 $to = $ud->user_email; 165 165 166 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );166 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name ); 167 167 168 168 $message = sprintf( __( … … 200 200 bp_core_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' ); 201 201 202 if ( 'no' == get_user meta( $invited_user_id, 'notification_groups_invite') )202 if ( 'no' == get_user_meta( $invited_user_id, 'notification_groups_invite', true ) ) 203 203 return false; 204 204 … … 212 212 $to = $invited_ud->user_email; 213 213 214 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );214 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name ); 215 215 216 216 $message = sprintf( __( … … 259 259 260 260 // Now email the user with the contents of the message (if they have enabled email notifications) 261 if ( 'no' != get_user meta( $user_id, 'notification_activity_new_mention') ) {261 if ( 'no' != get_user_meta( $user_id, 'notification_activity_new_mention', true ) ) { 262 262 $poster_name = bp_core_get_user_displayname( $poster_user_id ); 263 263 … … 271 271 $ud = bp_core_get_core_userdata( $receiver_user_id ); 272 272 $to = $ud->user_email; 273 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname') . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );273 $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name ); 274 274 275 275 $message = sprintf( __(
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)