Changeset 13167 for trunk/src/bp-core/bp-core-filters.php
- Timestamp:
- 12/10/2021 04:14:25 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-filters.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r13165 r13167 462 462 */ 463 463 function bp_core_activation_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key ) { 464 $is_signup_resend = false; 465 if ( is_admin() && buddypress()->members->admin->signups_page == get_current_screen()->id ) { 466 // The admin is just approving/sending/resending the verification email. 467 $is_signup_resend = true; 468 } 469 464 470 $args = array( 465 471 'tokens' => array( … … 482 488 } 483 489 484 bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $salutation ) ), $args ); 490 /** 491 * Filters if BuddyPress should send an activation key for a new multisite signup. 492 * 493 * @since 10.0.0 494 * 495 * @param string $user The user's login name. 496 * @param string $user_email The user's email address. 497 * @param string $key The activation key created in wpmu_signup_blog(). 498 * @param bool $is_signup_resend Is the site admin sending this email? 499 * @param string $domain The new blog domain. 500 * @param string $path The new blog path. 501 * @param string $title The site title. 502 */ 503 if ( apply_filters( 'bp_core_signup_send_activation_key_multisite_blog', true, $user, $user_email, $key, $is_signup_resend, $domain, $path, $title ) ) { 504 bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $salutation ) ), $args ); 505 } 485 506 486 507 // Return false to stop the original WPMU function from continuing. … … 503 524 */ 504 525 function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) { 526 $is_signup_resend = false; 505 527 if ( is_admin() ) { 506 528 … … 516 538 } 517 539 518 /* 519 * There can be a case where the user was created without the skip confirmation 520 * And the super admin goes in pending accounts to resend it. In this case, as the 521 * meta['password'] is not set, the activation url must be WordPress one. 522 */ 540 // The site admin is approving/resending from the "manage signups" screen. 523 541 } elseif ( buddypress()->members->admin->signups_page == get_current_screen()->id ) { 542 /* 543 * There can be a case where the user was created without the skip confirmation 544 * And the super admin goes in pending accounts to resend it. In this case, as the 545 * meta['password'] is not set, the activation url must be WordPress one. 546 */ 524 547 $is_hashpass_in_meta = maybe_unserialize( $meta ); 525 548 … … 527 550 return $user; 528 551 } 552 553 // Or the admin is just approving/sending/resending the verification email. 554 $is_signup_resend = true; 529 555 } 530 556 } … … 551 577 ), 552 578 ); 553 bp_send_email( 'core-user-registration', array( array( $user_email => $salutation ) ), $args ); 579 580 /** 581 * Filters if BuddyPress should send an activation key for a new multisite signup. 582 * 583 * @since 10.0.0 584 * 585 * @param string $user The user's login name. 586 * @param string $user_email The user's email address. 587 * @param string $key The activation key created in wpmu_signup_blog(). 588 * @param bool $is_signup_resend Is the site admin sending this email? 589 */ 590 if ( apply_filters( 'bp_core_signup_send_activation_key_multisite', true, $user, $user_email, $key, $is_signup_resend ) ) { 591 bp_send_email( 'core-user-registration', array( array( $user_email => $salutation ) ), $args ); 592 } 554 593 555 594 // Return false to stop the original WPMU function from continuing.
Note: See TracChangeset
for help on using the changeset viewer.