Changes from branches/1.2/bp-activity/bp-activity-notifications.php at r2869 to tags/1.2.6/bp-activity/bp-activity-notifications.php at r3297
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/1.2.6/bp-activity/bp-activity-notifications.php
r2869 r3297 5 5 6 6 /* Scan for @username strings in an activity update. Notify each user. */ 7 $pattern = '/[@]+([A-Za-z0-9-_ ]+)/';7 $pattern = '/[@]+([A-Za-z0-9-_\.]+)/'; 8 8 preg_match_all( $pattern, $content, $usernames ); 9 9 … … 17 17 18 18 // Now email the user with the contents of the message (if they have enabled email notifications) 19 if ( 'no' != get_user meta( $receiver_user_id, 'notification_activity_new_mention') ) {19 if ( 'no' != get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) { 20 20 $poster_name = bp_core_get_user_displayname( $poster_user_id ); 21 21 … … 27 27 28 28 // Set up and send the message 29 $ud = bp_core_get_core_userdata( $receiver_user_id ); 30 $to = $ud->user_email; 31 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name ); 29 $ud = bp_core_get_core_userdata( $receiver_user_id ); 30 $to = $ud->user_email; 31 $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES ); 32 $subject = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name ); 32 33 33 34 $message = sprintf( __( … … 61 62 $original_activity = new BP_Activity_Activity( $activity_id ); 62 63 63 if ( $original_activity->user_id != $commenter_id && 'no' != get_user meta( $original_activity->user_id, 'notification_activity_new_reply') ) {64 if ( $original_activity->user_id != $commenter_id && 'no' != get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) { 64 65 $poster_name = bp_core_get_user_displayname( $commenter_id ); 65 66 $thread_link = bp_activity_get_permalink( $activity_id ); … … 70 71 71 72 // Set up and send the message 72 $ud = bp_core_get_core_userdata( $original_activity->user_id ); 73 $to = $ud->user_email; 74 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name ); 73 $ud = bp_core_get_core_userdata( $original_activity->user_id ); 74 $to = $ud->user_email; 75 $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES ); 76 $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name ); 75 77 76 78 $message = sprintf( __( … … 103 105 $parent_comment = new BP_Activity_Activity( $parent_id ); 104 106 105 if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != get_user meta( $parent_comment->user_id, 'notification_activity_new_reply') ) {107 if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) { 106 108 $poster_name = bp_core_get_user_displayname( $commenter_id ); 107 109 $thread_link = bp_activity_get_permalink( $activity_id ); … … 109 111 110 112 // Set up and send the message 111 $ud = bp_core_get_core_userdata( $parent_comment->user_id ); 112 $to = $ud->user_email; 113 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name ); 113 $ud = bp_core_get_core_userdata( $parent_comment->user_id ); 114 $to = $ud->user_email; 115 $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES ); 116 $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name ); 114 117 115 118 $poster_name = stripslashes( $poster_name );
Note: See TracChangeset
for help on using the changeset viewer.