Changeset 5025
- Timestamp:
- 08/22/2011 07:41:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-filters.php
r4991 r5025 48 48 * 49 49 * @package BuddyPress Core 50 * @global $current_site Object containing current site metadata51 50 * @return noreply@sitedomain email address 52 51 */ … … 191 190 // Notify user of signup success. 192 191 function bp_core_activation_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta ) { 193 global $current_site;194 192 195 193 // Send email with activation link. 196 194 $activate_url = bp_get_activation_page() ."?key=$key"; 197 $activate_url = esc_url( $activate_url);198 199 $admin_email = get_site_option( "admin_email");195 $activate_url = esc_url( $activate_url ); 196 197 $admin_email = get_site_option( 'admin_email' ); 200 198 201 199 if ( empty( $admin_email ) ) 202 200 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 203 201 204 $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : esc_html( get_site_option( "site_name") );205 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset') . "\"\n";206 $message = sprintf( __( "Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%1$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%2$s", 'buddypress' ), $activate_url, esc_url("http://{$domain}{$path}" ) );207 $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), esc_url('http://' . $domain . $path));208 209 / * Send the message */210 $to = apply_filters( 'bp_core_activation_signup_blog_notification_to',$user_email, $domain, $path, $title, $user, $user_email, $key, $meta );211 $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject, $domain, $path, $title, $user, $user_email, $key, $meta );212 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta );202 $from_name = ( '' == get_site_option( 'site_name' ) ) ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 203 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 204 $message = sprintf( __( "Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%1$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%2$s", 'buddypress' ), $activate_url, esc_url( "http://{$domain}{$path}" ) ); 205 $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), esc_url( 'http://' . $domain . $path ) ); 206 207 // Send the message 208 $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email, $domain, $path, $title, $user, $user_email, $key, $meta ); 209 $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject, $domain, $path, $title, $user, $user_email, $key, $meta ); 210 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 213 211 214 212 wp_mail( $to, $subject, $message, $message_headers ); … … 223 221 224 222 function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) { 225 global $current_site; 226 227 $activate_url = bp_get_activation_page() ."?key=$key"; 223 224 $activate_url = bp_get_activation_page() . "?key=$key"; 228 225 $activate_url = esc_url($activate_url); 229 $admin_email = get_site_option( "admin_email");226 $admin_email = get_site_option( 'admin_email' ); 230 227 231 228 if ( empty( $admin_email ) ) 232 229 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 233 230 234 /* If this is an admin generated activation, add a param to email the user login details */ 231 // If this is an admin generated activation, add a param to email the 232 // user login details 235 233 $email = is_admin() ? '&e=1' : ''; 236 234 237 $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : esc_html( get_site_option( "site_name") );238 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset') . "\"\n";239 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url . $email );240 $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' );241 242 / * Send the message */243 $to = apply_filters( 'bp_core_activation_signup_user_notification_to',$user_email, $user, $user_email, $key, $meta );235 $from_name = ( '' == get_site_option( 'site_name' ) ) ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 236 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 237 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url . $email ); 238 $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' ); 239 240 // Send the message 241 $to = apply_filters( 'bp_core_activation_signup_user_notification_to', $user_email, $user, $user_email, $key, $meta ); 244 242 $subject = apply_filters( 'bp_core_activation_signup_user_notification_subject', $subject, $user, $user_email, $key, $meta ); 245 243 $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message, $user, $user_email, $key, $meta );
Note: See TracChangeset
for help on using the changeset viewer.