Changeset 2114 for trunk/bp-core/deprecated/bp-core-deprecated.php
- Timestamp:
- 11/24/2009 10:05:01 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/deprecated/bp-core-deprecated.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/deprecated/bp-core-deprecated.php
r2088 r2114 332 332 $blog_title = $filtered_results['blog_title']; 333 333 $errors = $filtered_results['errors']; 334 334 335 335 if ( empty($blogname) ) 336 336 $blogname = $user_name; … … 567 567 return false; 568 568 } 569 add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 );570 569 571 570 function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) { 572 571 global $current_site; 573 572 573 if( !apply_filters('wpmu_signup_user_notification', $user, $user_email, $key, $meta) ) 574 return false; 575 574 576 // Send email with activation link. 575 577 $admin_email = get_site_option( "admin_email" ); 576 578 577 if ( empty( $admin_email ))579 if ( $admin_email == '' ) 578 580 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 579 581 580 $from_name = ( '' == get_site_option( "site_name" ) )? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) );582 $from_name = get_site_option( "site_name" ) == '' ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) ); 581 583 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 582 $message = apply_filters( 'wpmu_signup_user_notification_email', sprintf( __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n", 'buddypress' ), clean_url( bp_activation_page( false ) . "?key=$key" ) ) ); 583 $subject = apply_filters( 'wpmu_signup_user_notification_subject', sprintf( __( 'Activate %s', 'buddypress' ), $user ) ); 584 585 wp_mail( $user_email, $subject, $message, $message_headers ); 584 $message = sprintf( apply_filters( 'wpmu_signup_user_notification_email', __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n" ) ), site_url( "wp-activate.php?key=$key" ), $key ); 585 586 // TODO: Don't hard code activation link. 587 $subject = sprintf(__( apply_filters( 'wpmu_signup_user_notification_subject', 'Activate %s' )), $user); 588 wp_mail($user_email, $subject, $message, $message_headers); 586 589 587 590 // Return false to stop the original WPMU function from continuing 588 591 return false; 589 592 } 590 add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 ); 593 594 function bp_core_load_deprecated_signup_email_functions() { 595 /* If we are using a BuddyPress 1.1+ theme ignore this. */ 596 if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) 597 return false; 598 599 add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 ); 600 add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 ); 601 } 602 add_action( 'plugins_loaded', 'bp_core_load_deprecated_signup_email_functions' ); 591 603 592 604 /*** END DEPRECATED SIGNUP FUNCTIONS **********/
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)