Ticket #7045: 7045.01.patch
File 7045.01.patch, 1.3 KB (added by , 9 years ago) |
---|
-
src/bp-core/bp-core-filters.php
1024 1024 $tokens['recipient.email'] = ''; 1025 1025 $tokens['recipient.name'] = ''; 1026 1026 $tokens['recipient.username'] = ''; 1027 $tokens['unsubscribe'] = site_url( 'wp-login.php' );1028 1029 1027 1030 1028 // Who is the email going to? 1031 1029 $recipient = $email->get( 'to' ); … … 1042 1040 1043 1041 if ( $user_obj ) { 1044 1042 // Unsubscribe link. 1045 $tokens['unsubscribe'] = esc_url( sprintf( 1046 '%s%s/notifications/', 1047 bp_core_get_user_domain( $user_obj->ID ), 1048 function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings' 1049 ) ); 1043 if ( bp_is_active( 'settings' ) && empty( $tokens['unsubscribe'] ) ) { 1044 $tokens['unsubscribe'] = esc_url( sprintf( 1045 '%s%s/notifications/', 1046 bp_core_get_user_domain( $user_obj->ID ), 1047 bp_get_settings_slug() 1048 ) ); 1049 } 1050 1050 1051 $tokens['recipient.username'] = $user_obj->user_login; 1051 1052 } 1052 1053 } 1053 1054 1055 // Set default unsubscribe link if not passed. 1056 if ( empty( $tokens['unsubscribe'] ) ) { 1057 $tokens['unsubscribe'] = site_url( 'wp-login.php' ); 1058 } 1059 1054 1060 // Email preheader. 1055 1061 $post = $email->get_post_object(); 1056 1062 if ( $post ) {