Changeset 2719
- Timestamp:
- 02/15/2010 10:30:56 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-notifications.php
r2717 r2719 23 23 $settings_link = bp_core_get_user_domain( $receiver_user_id ) . BP_SETTINGS_SLUG . '/notifications/'; 24 24 25 $poster_name = stripslashes( $poster_name ); 26 $content = bp_activity_filter_kses( stripslashes($content) ); 27 25 28 // Set up and send the message 26 29 $ud = bp_core_get_core_userdata( $receiver_user_id ); 27 30 $to = $ud->user_email; 28 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), stripslashes($poster_name));31 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name ); 29 32 30 33 $message = sprintf( __( … … 36 39 37 40 --------------------- 38 ', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes($content) ), $message_link );41 ', 'buddypress' ), $poster_name, $content, $message_link ); 39 42 40 43 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); … … 42 45 /* Send the message */ 43 46 $to = apply_filters( 'bp_activity_at_message_notification_to', $to ); 44 $subject = apply_filters( 'bp_activity_at_message_notification_subject', $subject );45 $message = apply_filters( 'bp_activity_at_message_notification_message', $message );47 $subject = apply_filters( 'bp_activity_at_message_notification_subject', $subject, $poster_name ); 48 $message = apply_filters( 'bp_activity_at_message_notification_message', $message, $poster_name, $content, $message_link ); 46 49 47 50 wp_mail( $to, $subject, $message ); … … 63 66 $settings_link = bp_core_get_user_domain( $original_activity->user_id ) . BP_SETTINGS_SLUG . '/notifications/'; 64 67 68 $poster_name = stripslashes( $poster_name ); 69 $content = bp_activity_filter_kses( stripslashes($content) ); 70 65 71 // Set up and send the message 66 72 $ud = bp_core_get_core_userdata( $original_activity->user_id ); 67 73 $to = $ud->user_email; 68 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), stripslashes_deep( $poster_name ));74 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name ); 69 75 70 76 $message = sprintf( __( … … 76 82 77 83 --------------------- 78 ', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes( $content ) ), $thread_link );84 ', 'buddypress' ), $poster_name, $content, $thread_link ); 79 85 80 86 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); … … 82 88 /* Send the message */ 83 89 $to = apply_filters( 'bp_activity_new_comment_notification_to', $to ); 84 $subject = apply_filters( 'bp_activity_new_comment_notification_subject', $subject );85 $message = apply_filters( 'bp_activity_new_comment_notification_message', $message );90 $subject = apply_filters( 'bp_activity_new_comment_notification_subject', $subject, $poster_name ); 91 $message = apply_filters( 'bp_activity_new_comment_notification_message', $message, $poster_name, $content, $thread_link ); 86 92 87 93 wp_mail( $to, $subject, $message ); … … 105 111 $ud = bp_core_get_core_userdata( $parent_comment->user_id ); 106 112 $to = $ud->user_email; 107 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), stripslashes_deep( $poster_name ) ); 113 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name ); 114 115 $poster_name = stripslashes( $poster_name ); 116 $content = bp_activity_filter_kses( stripslashes( $content ) ); 108 117 109 118 $message = sprintf( __( … … 115 124 116 125 --------------------- 117 ', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes( $content ) ), $thread_link );126 ', 'buddypress' ), $poster_name, $content, $thread_link ); 118 127 119 128 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); … … 121 130 /* Send the message */ 122 131 $to = apply_filters( 'bp_activity_new_comment_notification_comment_author_to', $to ); 123 $subject = apply_filters( 'bp_activity_new_comment_notification_comment_author_subject', $subject );124 $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message );132 $subject = apply_filters( 'bp_activity_new_comment_notification_comment_author_subject', $subject, $poster_name ); 133 $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message, $poster_name, $content ); 125 134 126 135 wp_mail( $to, $subject, $message ); -
trunk/bp-activity/bp-activity-templatetags.php
r2718 r2719 939 939 $content = $activities_template->activity->action . $activities_template->activity->content; 940 940 941 return apply_filters( 'bp_get_activity_feed_item_description', html_entity_decode( utf8_encode( str_replace( '%s', '', $content )) ) );941 return apply_filters( 'bp_get_activity_feed_item_description', html_entity_decode( str_replace( '%s', '', $content ) ) ); 942 942 } 943 943 -
trunk/bp-friends/bp-friends-notifications.php
r2717 r2719 35 35 /* Send the message */ 36 36 $to = apply_filters( 'friends_notification_new_request_to', $to ); 37 $subject = apply_filters( 'friends_notification_new_request_subject', $subject );38 $message = apply_filters( 'friends_notification_new_request_message', $message );37 $subject = apply_filters( 'friends_notification_new_request_subject', $subject, $initiator_name ); 38 $message = apply_filters( 'friends_notification_new_request_message', $message, $initiator_name, $initiator_link, $all_requests_link ); 39 39 40 40 wp_mail( $to, $subject, $message ); … … 72 72 /* Send the message */ 73 73 $to = apply_filters( 'friends_notification_accepted_request_to', $to ); 74 $subject = apply_filters( 'friends_notification_accepted_request_subject', $subject );75 $message = apply_filters( 'friends_notification_accepted_request_message', $message );74 $subject = apply_filters( 'friends_notification_accepted_request_subject', $subject, $friend_name ); 75 $message = apply_filters( 'friends_notification_accepted_request_message', $message, $friend_name, $friend_link ); 76 76 77 77 wp_mail( $to, $subject, $message ); -
trunk/bp-groups/bp-groups-notifications.php
r2717 r2719 31 31 /* Send the message */ 32 32 $to = apply_filters( 'groups_notification_group_updated_to', $to ); 33 $subject = apply_filters( 'groups_notification_group_updated_subject', $subject );34 $message = apply_filters( 'groups_notification_group_updated_message', $message );33 $subject = apply_filters( 'groups_notification_group_updated_subject', $subject, &$group ); 34 $message = apply_filters( 'groups_notification_group_updated_message', $message, &$group, $group_link ); 35 35 36 36 wp_mail( $to, $subject, $message ); … … 79 79 /* Send the message */ 80 80 $to = apply_filters( 'groups_notification_new_membership_request_to', $to ); 81 $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject );82 $message = apply_filters( 'groups_notification_new_membership_request_message', $message );81 $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject, &$group ); 82 $message = apply_filters( 'groups_notification_new_membership_request_message', $message, &$group, $requesting_user_name, $profile_link, $group_requests ); 83 83 84 84 wp_mail( $to, $subject, $message ); … … 132 132 /* Send the message */ 133 133 $to = apply_filters( 'groups_notification_membership_request_completed_to', $to ); 134 $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject );135 $message = apply_filters( 'groups_notification_membership_request_completed_message', $message );134 $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject, &$group ); 135 $message = apply_filters( 'groups_notification_membership_request_completed_message', $message, &$group, $group_link ); 136 136 137 137 wp_mail( $to, $subject, $message ); … … 178 178 /* Send the message */ 179 179 $to = apply_filters( 'groups_notification_promoted_member_to', $to ); 180 $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject );181 $message = apply_filters( 'groups_notification_promoted_member_message', $message );180 $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject, &$group ); 181 $message = apply_filters( 'groups_notification_promoted_member_message', $message, &$group, $promoted_to, $group_link ); 182 182 183 183 wp_mail( $to, $subject, $message ); … … 230 230 /* Send the message */ 231 231 $to = apply_filters( 'groups_notification_group_invites_to', $to ); 232 $subject = apply_filters( 'groups_notification_group_invites_subject', $subject );233 $message = apply_filters( 'groups_notification_group_invites_message', $message );232 $subject = apply_filters( 'groups_notification_group_invites_subject', $subject, &$group ); 233 $message = apply_filters( 'groups_notification_group_invites_message', $message, &$group, $inviter_name, $inviter_link, $invites_link, $group_link ); 234 234 235 235 wp_mail( $to, $subject, $message ); … … 265 265 $settings_link = bp_core_get_user_domain( $receiver_user_id ) . BP_SETTINGS_SLUG . '/notifications/'; 266 266 267 $poster_name = stripslashes( $poster_name ); 268 $content = bp_groups_filter_kses( stripslashes( $content ) ); 269 267 270 // Set up and send the message 268 271 $ud = bp_core_get_core_userdata( $receiver_user_id ); 269 272 $to = $ud->user_email; 270 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), stripslashes( $poster_name ), $group->name );273 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name ); 271 274 272 275 $message = sprintf( __( … … 278 281 279 282 --------------------- 280 ', 'buddypress' ), $poster_name, $group->name, bp_groups_filter_kses( stripslashes( $content ) ), $message_link );283 ', 'buddypress' ), $poster_name, $group->name, $content, $message_link ); 281 284 282 285 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); … … 284 287 /* Send the message */ 285 288 $to = apply_filters( 'groups_at_message_notification_to', $to ); 286 $subject = apply_filters( 'groups_at_message_notification_subject', $subject );287 $message = apply_filters( 'groups_at_message_notification_message', $message );289 $subject = apply_filters( 'groups_at_message_notification_subject', $subject, &$group, $poster_name ); 290 $message = apply_filters( 'groups_at_message_notification_message', $message, &$group, $poster_name, $content, $message_link ); 288 291 289 292 wp_mail( $to, $subject, $message ); -
trunk/bp-messages/bp-messages-notifications.php
r2717 r2719 14 14 $settings_link = bp_core_get_user_domain( $recipient->user_id ) . BP_SETTINGS_SLUG . '/notifications/'; 15 15 16 $sender_name = stripslashes( $sender_name ); 17 $subject = stripslashes( wp_filter_kses( $subject ) ); 18 $content = stripslashes( wp_filter_kses( $content ) ); 19 16 20 // Set up and send the message 17 21 $email_to = $ud->user_email; 18 $email_subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), stripslashes( $sender_name ));22 $email_subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name ); 19 23 20 24 $email_content = sprintf( __( … … 28 32 29 33 --------------------- 30 ', 'buddypress' ), $sender_name, stripslashes( wp_filter_kses( $subject ) ), stripslashes( wp_filter_kses( $content ) ), $message_link );34 ', 'buddypress' ), $sender_name, $subject, $content, $message_link ); 31 35 32 36 $content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); … … 34 38 /* Send the message */ 35 39 $email_to = apply_filters( 'messages_notification_new_message_to', $email_to ); 36 $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject );37 $email_content = apply_filters( 'messages_notification_new_message_message', $email_content );40 $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject, $sender_name ); 41 $email_content = apply_filters( 'messages_notification_new_message_message', $email_content, $sender_name, $subject, $content, $message_link ); 38 42 39 43 wp_mail( $email_to, $email_subject, $email_content );
Note: See TracChangeset
for help on using the changeset viewer.