Changeset 12912 for trunk/src/bp-core/bp-core-filters.php
- Timestamp:
- 04/28/2021 11:49:18 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r12757 r12912 1068 1068 // Add 'List-Unsubscribe' header if applicable. 1069 1069 if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== wp_login_url() ) { 1070 $user = get_user_by( 'email', $tokens['recipient.email'] ); 1071 1072 $link = bp_email_get_unsubscribe_link( array( 1073 'user_id' => $user->ID, 1070 $user = get_user_by( 'email', $tokens['recipient.email'] ); 1071 $user_id = isset( $user->ID ) ? $user->ID : 0; 1072 1073 $args = array( 1074 'user_id' => $user_id, 1074 1075 'notification_type' => $email->get( 'type' ), 1075 ) ); 1076 ); 1077 1078 // If this email is not to a current member, include the nonmember's email address and the Inviter ID. 1079 if ( ! $user_id ) { 1080 $args['email_address'] = $tokens['recipient.email']; 1081 $args['member_id'] = bp_loggedin_user_id(); 1082 } 1083 1084 $link = bp_email_get_unsubscribe_link( $args ); 1076 1085 1077 1086 if ( ! empty( $link ) ) {
Note: See TracChangeset
for help on using the changeset viewer.