Changeset 13165 for trunk/src/bp-core/bp-core-filters.php
- Timestamp:
- 12/10/2021 04:13:57 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r12912 r13165 474 474 ); 475 475 476 $signups = BP_Signup::get( 477 array( 478 'user_login' => $user, 479 ) 480 ); 481 476 $signup = bp_members_get_signup_by( 'activation_key', $key ); 482 477 $salutation = $user; 483 if ( $signups && bp_is_active( 'xprofile' ) ) { 484 $signup = $signups['signups'][0]; 478 if ( $signup && bp_is_active( 'xprofile' ) ) { 485 479 if ( isset( $signup->meta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) { 486 480 $salutation = $signup->meta[ 'field_' . bp_xprofile_fullname_field_id() ]; … … 563 557 } 564 558 add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 ); 559 560 /** 561 * Ensure that some meta values are set for new multisite signups. 562 * 563 * @since 10.0.0 564 * 565 * @see wpmu_signup_user() for a full description of params. 566 * 567 * @param array $meta Signup meta data. Default empty array. 568 * @return array Signup meta data. 569 */ 570 function bp_core_add_meta_to_multisite_signups( $meta ) { 571 572 // Ensure that sent_date and count_sent are set in meta. 573 if ( ! isset( $meta['sent_date'] ) ) { 574 $meta['sent_date'] = '0000-00-00 00:00:00'; 575 } 576 if ( ! isset( $meta['count_sent'] ) ) { 577 $meta['count_sent'] = 0; 578 } 579 580 return $meta; 581 } 582 add_filter( 'signup_user_meta', 'bp_core_add_meta_to_multisite_signups' ); 583 add_filter( 'signup_site_meta', 'bp_core_add_meta_to_multisite_signups' ); 565 584 566 585 /**
Note: See TracChangeset
for help on using the changeset viewer.