Changeset 12886 for trunk/src/bp-core/bp-core-update.php
- Timestamp:
- 04/16/2021 05:32:04 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-update.php
r12851 r12886 599 599 * 600 600 * - Edit the `new_avatar` activity type's component to `members`. 601 * - Upgrade Primary xProfile Group's fields to signup fields. 601 602 * 602 603 * @since 8.0.0 … … 622 623 ) 623 624 ); 625 626 if ( bp_get_signup_allowed() ) { 627 // Get the Primary Group's fields. 628 $signup_fields = $wpdb->get_col( "SELECT id FROM {$bp_prefix}bp_xprofile_fields WHERE group_id = 1 ORDER BY field_order ASC" ); 629 630 // Migrate potential signup fields. 631 if ( $signup_fields ) { 632 $signup_position = 0; 633 foreach ( $signup_fields as $signup_field_id ) { 634 $signup_position += 1; 635 636 $wpdb->insert( 637 $bp_prefix . 'bp_xprofile_meta', 638 array( 639 'object_id' => $signup_field_id, 640 'object_type' => 'field', 641 'meta_key' => 'signup_position', 642 'meta_value' => $signup_position, 643 ), 644 array( 645 '%d', 646 '%s', 647 '%s', 648 '%d', 649 ) 650 ); 651 } 652 } 653 } 624 654 } 625 655
Note: See TracChangeset
for help on using the changeset viewer.