Ticket #7697: 7697.01.patch
File 7697.01.patch, 856 bytes (added by , 6 years ago) |
---|
-
src/bp-core/bp-core-filters.php
1008 1008 if ( ! empty( $tokens['unsubscribe'] ) && $tokens['unsubscribe'] !== wp_login_url() ) { 1009 1009 $user = get_user_by( 'email', $tokens['recipient.email'] ); 1010 1010 1011 $headers['List-Unsubscribe'] = sprintf( 1012 '<%s>', 1013 esc_url_raw( bp_email_get_unsubscribe_link( array( 1014 'user_id' => $user->ID, 1015 'notification_type' => $email->get( 'type' ), 1016 ) ) ) 1017 ); 1011 $link = bp_email_get_unsubscribe_link( array( 1012 'user_id' => $user->ID, 1013 'notification_type' => $email->get( 'type' ), 1014 ) ); 1015 1016 if ( ! empty( $link ) ) { 1017 $headers['List-Unsubscribe'] = sprintf( '<%s>', esc_url_raw( $link ) ); 1018 } 1018 1019 } 1019 1020 1020 1021 return $headers;