Changeset 13167
- Timestamp:
- 12/10/2021 04:14:25 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 2 edited
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. -
trunk/src/bp-members/classes/class-bp-members-component.php
r13144 r13167 41 41 'adminbar_myaccount_order' => 20, 42 42 'search_query_arg' => 'members_search', 43 'features' => array( 'invitations' )43 'features' => array( 'invitations', 'membership_requests' ), 44 44 ) 45 45 ); … … 73 73 if ( bp_is_active( 'activity' ) ) { 74 74 $includes[] = 'activity'; 75 } 76 77 /** 78 * Duplicate bp_get_membership_requests_required() and 79 * bp_get_signup_allowed() logic here, 80 * because those functions are not available yet. 81 * The `bp_get_signup_allowed` filter is documented in 82 * bp-members/bp-members-template.php. 83 */ 84 $signup_allowed = apply_filters( 'bp_get_signup_allowed', (bool) bp_get_option( 'users_can_register' ) ); 85 $membership_requests_enabled = (bool) bp_get_option( 'bp-enable-membership-requests' ); 86 if ( bp_is_active( 'members', 'membership_requests' ) && ! $signup_allowed && $membership_requests_enabled ) { 87 $includes[] = 'membership-requests'; 75 88 } 76 89
Note: See TracChangeset
for help on using the changeset viewer.