Changeset 6069
- Timestamp:
- 06/09/2012 02:40:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-template.php
r6051 r6069 431 431 extract( $r, EXTR_SKIP ); 432 432 433 if ( !method_exists( $field, 'get_children' ) ) 434 $field = new BP_XProfile_Field( $field->id ); 433 // In some cases, the $field global is not an instantiation of the BP_XProfile_Field 434 // class. However, we have to make sure that all data originally in $field gets 435 // merged back in, after reinstantiation. 436 if ( !method_exists( $field, 'get_children' ) ) { 437 $field_obj = new BP_XProfile_Field( $field->id ); 438 439 foreach( $field as $field_prop => $field_prop_value ) { 440 if ( !isset( $field_obj->{$field_prop} ) ) { 441 $field_obj->{$field_prop} = $field_prop_value; 442 } 443 } 444 445 $field = $field_obj; 446 } 435 447 436 448 $options = $field->get_children();
Note: See TracChangeset
for help on using the changeset viewer.