Changeset 10941 for trunk/src/bp-activity/bp-activity-notifications.php
- Timestamp:
- 07/10/2016 09:46:27 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-notifications.php
r10895 r10941 54 54 $group_name = bp_get_current_group_name(); 55 55 } 56 57 $unsubscribe_args = array( 58 'user_id' => $receiver_user_id, 59 'notification_type' => $email_type, 60 ); 56 61 57 62 $args = array( … … 63 68 'poster.name' => $poster_name, 64 69 'receiver-user.id' => $receiver_user_id, 70 'unsubscribe' => esc_url( bp_email_get_unsubscribe_link( $unsubscribe_args ) ), 65 71 ), 66 72 ); … … 114 120 // Send an email if the user hasn't opted-out. 115 121 if ( 'no' != bp_get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) { 122 123 $unsubscribe_args = array( 124 'user_id' => $original_activity->user_id, 125 'notification_type' => 'activity-comment', 126 ); 127 116 128 $args = array( 117 129 'tokens' => array( … … 122 134 'poster.name' => $poster_name, 123 135 'thread.url' => esc_url( $thread_link ), 136 'unsubscribe' => esc_url( bp_email_get_unsubscribe_link( $unsubscribe_args ) ), 124 137 ), 125 138 ); … … 156 169 // Send an email if the user hasn't opted-out. 157 170 if ( 'no' != bp_get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) { 171 172 $unsubscribe_args = array( 173 'user_id' => $parent_comment->user_id, 174 'notification_type' => 'activity-comment-author', 175 ); 176 158 177 $args = array( 159 178 'tokens' => array( … … 164 183 'poster.name' => $poster_name, 165 184 'thread.url' => esc_url( $thread_link ), 185 'unsubscribe' => esc_url( bp_email_get_unsubscribe_link( $unsubscribe_args ) ), 166 186 ), 167 187 ); … … 179 199 * @param int $commenter_id ID of the user who made the comment. 180 200 * @param array $params Arguments used with the original activity comment. 181 201 */ 182 202 do_action( 'bp_activity_sent_reply_to_reply_notification', $parent_comment, $comment_id, $commenter_id, $params ); 183 203 }
Note: See TracChangeset
for help on using the changeset viewer.