Skip to:
Content

BuddyPress.org

Ticket #8211: 8211.patch

File 8211.patch, 1.5 KB (added by fayazgabol, 5 years ago)

Patch

  • bp-xprofile-functions.php

     
    466466        $field->field_id = $field_id;
    467467        $field->user_id  = $user_id;
    468468
    469         // Gets un/reserialized via xprofile_sanitize_data_value_before_save()
     469        // Gets un/reserialized via xprofile_sanitize_data_value_before_save().
    470470        $field->value    = maybe_serialize( $value );
    471471
    472472        return $field->save();
     
    11971197                $current_user_id = bp_loggedin_user_id();
    11981198        }
    11991199
    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.
    12011201        $hidden_levels = bp_xprofile_get_hidden_field_types_for_user( $displayed_user_id, $current_user_id );
    12021202        $hidden_fields = bp_xprofile_get_fields_by_visibility_levels( $displayed_user_id, $hidden_levels );
    12031203
  • bp-xprofile-template.php

     
    593593        function bp_get_the_profile_field_edit_value() {
    594594                global $field;
    595595
    596                 // Make sure field data object exists
     596                // Make sure field data object exists.
    597597                if ( ! isset( $field->data ) ) {
    598598                        $field->data = new stdClass;
    599599                }
    600600
    601                 // Default to empty value
     601                // Default to empty value.
    602602                if ( ! isset( $field->data->value ) ) {
    603603                        $field->data->value = '';
    604604                }