Skip to:
Content

BuddyPress.org

Changeset 11400


Ignore:
Timestamp:
01/25/2017 09:28:36 PM (3 years ago)
Author:
offereins
Message:

XProfile: use filtered template tag for checkbox/radio input names.

The field options structure in the checkbox and radio field types didn't
use bp_get_the_profile_field_input_name() for the input names. This
commit brings those types in line with the other field types using
filtered field template tags.

Fixes #7425.

Location:
trunk/src/bp-xprofile/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    r10855 r11400  
    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 ) ),
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    r10855 r11400  
    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 ) ),
Note: See TracChangeset for help on using the changeset viewer.