Changeset 7463
- Timestamp:
- 10/23/2013 07:35:37 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-filters.php
r7446 r7463 264 264 function bp_core_activation_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta ) { 265 265 266 // Se nd email with activation link.266 // Set up activation link 267 267 $activate_url = bp_get_activation_page() ."?key=$key"; 268 268 $activate_url = esc_url( $activate_url ); 269 269 270 $admin_email = get_site_option( 'admin_email' ); 271 272 if ( empty( $admin_email ) ) 273 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 274 275 $from_name = bp_get_option( 'blogname', 'WordPress' ); 276 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 277 $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}" ) ); 278 $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Activate %s', 'buddypress' ), 'http://' . $domain . $path ) ) ); 279 280 // Send the message 281 $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email, $domain, $path, $title, $user, $user_email, $key, $meta ); 282 $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject, $domain, $path, $title, $user, $user_email, $key, $meta ); 283 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 284 285 wp_mail( $to, $subject, $message, $message_headers ); 270 // Email contents 271 $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}" ) ); 272 $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Activate %s', 'buddypress' ), 'http://' . $domain . $path ) ) ); 273 274 // Email filters 275 $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email, $domain, $path, $title, $user, $user_email, $key, $meta ); 276 $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject, $domain, $path, $title, $user, $user_email, $key, $meta ); 277 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 278 279 // Send the email 280 wp_mail( $to, $subject, $message ); 286 281 287 282 do_action( 'bp_core_sent_blog_signup_email', $admin_email, $subject, $message, $domain, $path, $title, $user, $user_email, $key, $meta ); … … 305 300 function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) { 306 301 302 // Set up activation link 307 303 $activate_url = bp_get_activation_page() . "?key=$key"; 308 $activate_url = esc_url($activate_url); 309 $admin_email = get_site_option( 'admin_email' ); 310 311 if ( empty( $admin_email ) ) 312 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 313 314 $from_name = bp_get_option( 'blogname', 'WordPress' ); 315 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; 316 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url ); 317 $subject = bp_get_email_subject( array( 'text' => __( 'Activate Your Account', 'buddypress' ) ) ); 318 319 // Send the message 304 $activate_url = esc_url( $activate_url ); 305 306 // Email contents 307 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url ); 308 $subject = bp_get_email_subject( array( 'text' => __( 'Activate Your Account', 'buddypress' ) ) ); 309 310 // Email filters 320 311 $to = apply_filters( 'bp_core_activation_signup_user_notification_to', $user_email, $user, $user_email, $key, $meta ); 321 312 $subject = apply_filters( 'bp_core_activation_signup_user_notification_subject', $subject, $user, $user_email, $key, $meta ); 322 313 $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message, $user, $user_email, $key, $meta ); 323 314 324 wp_mail( $to, $subject, $message, $message_headers ); 315 // Send the email 316 wp_mail( $to, $subject, $message ); 325 317 326 318 do_action( 'bp_core_sent_user_signup_email', $admin_email, $subject, $message, $user, $user_email, $key, $meta );
Note: See TracChangeset
for help on using the changeset viewer.