Skip to:
Content

Ticket #7425: 7425.patch

File 7425.patch, 1.6 KB (added by Offereins, 17 months ago)
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
    index d986cd0..7267ad9 100644
    a b class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    156156
    157157                        $new_html = sprintf( '<label for="%3$s" class="option-label"><input %1$s type="checkbox" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
    158158                                $selected,
    159                                 esc_attr( "field_{$this->field_obj->id}[]" ),
     159                                esc_attr( bp_get_the_profile_field_input_name() . '[]' ),
    160160                                esc_attr( "field_{$options[$k]->id}_{$k}" ),
    161161                                esc_attr( stripslashes( $options[$k]->name ) ),
    162162                                esc_html( stripslashes( $options[$k]->name ) )
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php
    index f8e0d5d..6c039bb 100644
    a b class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { 
    134134
    135135                        $new_html = sprintf( '<label for="%3$s" class="option-label"><input %1$s type="radio" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
    136136                                $selected,
    137                                 esc_attr( "field_{$this->field_obj->id}" ),
     137                                esc_attr( bp_get_the_profile_field_input_name() ),
    138138                                esc_attr( "option_{$options[$k]->id}" ),
    139139                                esc_attr( stripslashes( $options[$k]->name ) ),
    140140                                esc_html( stripslashes( $options[$k]->name ) )