Ticket #8211: 8211.patch
File 8211.patch, 1.5 KB (added by , 5 years ago) |
---|
-
bp-xprofile-functions.php
466 466 $field->field_id = $field_id; 467 467 $field->user_id = $user_id; 468 468 469 // Gets un/reserialized via xprofile_sanitize_data_value_before_save() 469 // Gets un/reserialized via xprofile_sanitize_data_value_before_save(). 470 470 $field->value = maybe_serialize( $value ); 471 471 472 472 return $field->save(); … … 1197 1197 $current_user_id = bp_loggedin_user_id(); 1198 1198 } 1199 1199 1200 // @todo - This is where you'd swap out for current_user_can() checks 1200 // @todo - This is where you'd swap out for current_user_can() checks. 1201 1201 $hidden_levels = bp_xprofile_get_hidden_field_types_for_user( $displayed_user_id, $current_user_id ); 1202 1202 $hidden_fields = bp_xprofile_get_fields_by_visibility_levels( $displayed_user_id, $hidden_levels ); 1203 1203 -
bp-xprofile-template.php
593 593 function bp_get_the_profile_field_edit_value() { 594 594 global $field; 595 595 596 // Make sure field data object exists 596 // Make sure field data object exists. 597 597 if ( ! isset( $field->data ) ) { 598 598 $field->data = new stdClass; 599 599 } 600 600 601 // Default to empty value 601 // Default to empty value. 602 602 if ( ! isset( $field->data->value ) ) { 603 603 $field->data->value = ''; 604 604 }