- Timestamp:
- 06/01/2024 04:26:18 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php
r13797 r13878 325 325 $field_ids = self::get_group_field_ids( $group_ids, $r ); 326 326 327 foreach ( $groups as $group ) {327 foreach ( $groups as $group ) { 328 328 $group->fields = array(); 329 329 } … … 381 381 382 382 // Loop through the results and find the fields that have data. 383 foreach ( (array) $field_data as $data ) {383 foreach ( (array) $field_data as $data ) { 384 384 385 385 // Empty fields may contain a serialized empty array. … … 395 395 396 396 // The remaining members of $field_ids are empty. Remove them. 397 foreach ( $fields as $field_key => $field ) {397 foreach ( $fields as $field_key => $field ) { 398 398 if ( in_array( $field->id, $field_ids ) ) { 399 399 unset( $fields[ $field_key ] ); … … 409 409 410 410 // Loop through fields. 411 foreach ( (array) $fields as $field_key => $field ) {411 foreach ( (array) $fields as $field_key => $field ) { 412 412 413 413 // Loop through the data in each field. 414 foreach ( (array) $field_data as $data ) {414 foreach ( (array) $field_data as $data ) { 415 415 416 416 // Assign correct data value to the field. … … 439 439 440 440 // Merge the field array back in with the group array. 441 foreach ( (array) $groups as $group ) {441 foreach ( (array) $groups as $group ) { 442 442 // Indexes may have been shifted after previous deletions, so we get a 443 443 // fresh one each time through the loop. 444 444 $index = array_search( $group, $groups ); 445 445 446 foreach ( (array) $fields as $field ) {446 foreach ( (array) $fields as $field ) { 447 447 if ( $group->id === $field->group_id ) { 448 448 $groups[ $index ]->fields[] = $field; … … 757 757 $visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true ); 758 758 759 foreach ( (array) $fields as $key => $field ) {759 foreach ( (array) $fields as $key => $field ) { 760 760 761 761 // Does the admin allow this field to be customized?
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)