Changeset 2697
- Timestamp:
- 02/12/2010 01:01:19 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-notifications.php
r2663 r2697 40 40 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 41 41 42 // Send it 42 /* Send the message */ 43 $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 ); 46 43 47 wp_mail( $to, $subject, $message ); 44 48 } … … 76 80 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 77 81 78 // Send it 82 /* Send the message */ 83 $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 ); 86 79 87 wp_mail( $to, $subject, $message ); 80 88 } … … 111 119 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 112 120 113 // Send it 121 /* Send the message */ 122 $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 ); 125 114 126 wp_mail( $to, $subject, $message ); 115 127 } -
trunk/bp-core/bp-core-activation.php
r2635 r2697 114 114 $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), clean_url('http://' . $domain . $path)); 115 115 116 wp_mail( $user_email, $subject, $message, $message_headers ); 116 /* Send the message */ 117 $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email ); 118 $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject ); 119 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message ); 120 121 wp_mail( $to, $subject, $message, $message_headers ); 117 122 118 123 // Return false to stop the original WPMU function from continuing … … 141 146 $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' ); 142 147 143 wp_mail( $user_email, $subject, $message, $message_headers ); 148 /* Send the message */ 149 $to = apply_filters( 'bp_core_activation_signup_user_notification_to', $user_email ); 150 $subject = apply_filters( 'bp_core_activation_signup_user_notification_subject', $subject ); 151 $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message ); 152 153 wp_mail( $to, $subject, $message, $message_headers ); 144 154 145 155 // Return false to stop the original WPMU function from continuing -
trunk/bp-friends/bp-friends-notifications.php
r2307 r2697 33 33 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 34 34 35 // Send it 35 /* Send the message */ 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 ); 39 36 40 wp_mail( $to, $subject, $message ); 37 41 } 38 39 42 40 43 function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) { … … 67 70 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 68 71 69 // Send it 72 /* Send the message */ 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 ); 76 70 77 wp_mail( $to, $subject, $message ); 71 78 } 72 79 73 74 80 ?> -
trunk/bp-groups/bp-groups-notifications.php
r2663 r2697 29 29 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 30 30 31 // Send it 31 /* Send the message */ 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 ); 35 32 36 wp_mail( $to, $subject, $message ); 33 37 … … 73 77 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 74 78 75 // Send it 79 /* Send the message */ 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 ); 83 76 84 wp_mail( $to, $subject, $message ); 77 85 } … … 122 130 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 123 131 124 // Send it 132 /* Send the message */ 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 ); 136 125 137 wp_mail( $to, $subject, $message ); 126 138 } … … 164 176 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 165 177 166 // Send it 178 /* Send the message */ 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 ); 182 167 183 wp_mail( $to, $subject, $message ); 168 184 } … … 212 228 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 213 229 214 // Send it 230 /* Send the message */ 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 ); 234 215 235 wp_mail( $to, $subject, $message ); 216 236 } … … 262 282 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 263 283 264 // Send it 284 /* Send the message */ 285 $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 ); 288 265 289 wp_mail( $to, $subject, $message ); 266 290 } -
trunk/bp-messages/bp-messages-notifications.php
r2651 r2697 15 15 16 16 // Set up and send the message 17 $ to = $ud->user_email;17 $email_to = $ud->user_email; 18 18 $email_subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), stripslashes( $sender_name ) ); 19 19 … … 32 32 $content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); 33 33 34 // Send it 35 wp_mail( $to, $email_subject, $email_content ); 34 /* Send the message */ 35 $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 ); 38 39 wp_mail( $email_to, $email_subject, $email_content ); 36 40 } 37 41 } 38 42 39 /* This is too expensive to send on normal servers uncomment action at your own risk. */40 function messages_notification_new_notice( $message_subject, $message ) {41 global $bp, $wpdb;42 43 $status_sql = bp_core_get_status_sql( 'u.' );44 $users = $wpdb->get_results( $wpdb->prepare( "SELECT ID as user_id, user_email, user_login FROM {$wpdb->base_prefix}users WHERE {$status_sql}" ) );45 46 for ( $i = 0; $i < count($users); $i++ ) {47 if ( get_usermeta( $users[$i]->user_id, 'notification_messages_new_notice' ) == 'no' ) continue;48 49 $message_link = bp_core_get_user_domain( $users[$i]->user_id ) . 'messages';50 $settings_link = bp_core_get_user_domain( $users[$i]->user_id ) . 'settings/notifications';51 52 // Set up and send the message53 $to = $users[$i]->user_email;54 $subject = __( 'New Site Notice', 'buddypress' );55 56 $message = sprintf( __(57 'A new site notice has been posted on %s:58 59 "%s: %s"60 61 To view the notice: %s62 63 ---------------------64 ', 'buddypress' ), get_blog_option( BP_ROOT_BLOG, 'blogname' ), stripslashes( wp_filter_kses( $message_subject ) ), stripslashes( wp_filter_kses( $message ) ), $message_link );65 66 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );67 68 // Send it69 wp_mail( $to, $subject, $message );70 71 unset($message);72 unset($subject);73 unset($to);74 }75 }76 // add_action( 'bp_messages_notice_sent', 'messages_notification_new_notice', 10, 2 );77 78 43 ?>
Note: See TracChangeset
for help on using the changeset viewer.