diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
index 592f5b155..12bf4defc 100644
|
|
|
function bp_email_get_schema() {
|
| 3684 | 3684 | * @param array $emails The array of emails schema. |
| 3685 | 3685 | */ |
| 3686 | 3686 | return (array) apply_filters( 'bp_email_get_schema', array( |
| | 3687 | 'core-user-activation' => array( |
| | 3688 | /* translators: do not remove {} brackets or translate its contents. */ |
| | 3689 | 'post_title' => __( '[{{{site.name}}}] Welcome!', 'buddypress' ), |
| | 3690 | /* translators: do not remove {} brackets or translate its contents. */ |
| | 3691 | 'post_content' => __( "Hi {{{displayname}}},\n\nWelcome to [{{{site.name}}}]!", 'buddypress' ), |
| | 3692 | /* translators: do not remove {} brackets or translate its contents. */ |
| | 3693 | 'post_excerpt' => __( "Hi {{{displayname}}},\n\nWelcome to [{{{site.name}}}]!", 'buddypress' ), |
| | 3694 | ), |
| 3687 | 3695 | 'activity-comment' => array( |
| 3688 | 3696 | /* translators: do not remove {} brackets or translate its contents. */ |
| 3689 | 3697 | 'post_title' => __( '[{{{site.name}}}] {{poster.name}} replied to one of your updates', 'buddypress' ), |
| … |
… |
function bp_email_get_type_schema( $field = 'description' ) {
|
| 3956 | 3964 | ), |
| 3957 | 3965 | ); |
| 3958 | 3966 | |
| | 3967 | $core_user_activation_completed = array( |
| | 3968 | 'description' => __( 'Recipient has successfully activated an account.', 'buddypress' ), |
| | 3969 | ); |
| | 3970 | |
| 3959 | 3971 | $types = array( |
| 3960 | 3972 | 'activity-comment' => $activity_comment, |
| 3961 | 3973 | 'activity-comment-author' => $activity_comment_author, |
| … |
… |
function bp_email_get_type_schema( $field = 'description' ) {
|
| 3973 | 3985 | 'settings-verify-email-change' => $settings_verify_email_change, |
| 3974 | 3986 | 'groups-membership-request-accepted' => $groups_membership_request_accepted, |
| 3975 | 3987 | 'groups-membership-request-rejected' => $groups_membership_request_rejected, |
| | 3988 | 'core-user-activation-completed' => $core_user_activation_completed, |
| 3976 | 3989 | ); |
| 3977 | 3990 | |
| 3978 | 3991 | if ( $field !== 'all' ) { |
diff --git src/bp-core/bp-core-update.php src/bp-core/bp-core-update.php
index a7791c445..a8fd1391a 100644
|
|
|
function bp_update_to_5_0() {
|
| 604 | 604 | function bp_update_to_8_0() { |
| 605 | 605 | global $wpdb; |
| 606 | 606 | $bp_prefix = bp_core_get_table_prefix(); |
| | 607 | // Install welcome email to email list. |
| | 608 | add_filter( 'bp_email_get_schema', 'bp_core_get_welcome_email_schema' ); |
| | 609 | |
| | 610 | bp_core_install_emails(); |
| | 611 | |
| | 612 | remove_filter( 'bp_email_get_schema', 'bp_core_get_welcome_email_schema' ); |
| 607 | 613 | |
| 608 | 614 | // Update the `new_avatar` activity type's component to `members`. |
| 609 | 615 | $wpdb->update( |
diff --git src/bp-members/bp-members-functions.php src/bp-members/bp-members-functions.php
index 165bc97c3..8a720e6a4 100644
|
|
|
function bp_members_avatar_upload_dir( $directory = 'avatars', $user_id = 0 ) {
|
| 3306 | 3306 | 'error' => false |
| 3307 | 3307 | ) ); |
| 3308 | 3308 | } |
| | 3309 | |
| | 3310 | /** |
| | 3311 | * Send Core user welcome email on user activation link |
| | 3312 | * |
| | 3313 | * @since 8.0.0 |
| | 3314 | * |
| | 3315 | * @param int $user_id The user ID |
| | 3316 | */ |
| | 3317 | |
| | 3318 | function bp_send_welcome_email( $user_id ){ |
| | 3319 | // add tokens to parse in email |
| | 3320 | $args = array( |
| | 3321 | 'tokens' => array( |
| | 3322 | 'displayname' => bp_core_get_user_displayname( $user_id ), |
| | 3323 | ), |
| | 3324 | ); |
| | 3325 | |
| | 3326 | // send args and user ID to receive email |
| | 3327 | bp_send_email( 'core-user-activation', $user_id, $args ); |
| | 3328 | } |
| | 3329 | add_action( 'bp_core_activated_user', 'bp_send_welcome_email' ); |