Skip to:
Content

BuddyPress.org

Ticket #7083: 7083.03.patch

File 7083.03.patch, 1.8 KB (added by imath, 8 years ago)
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php
    index 34d752d..d986cd0 100644
    class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    176176                        $html .= apply_filters( 'bp_get_the_profile_field_options_checkbox', $new_html, $options[$k], $this->field_obj->id, $selected, $k );
    177177                }
    178178
    179                 echo $html;
     179                printf( '<div id="%1$s" class="input-options checkbox-options">%2$s</div>',
     180                        esc_attr( 'field_' . $this->field_obj->id ),
     181                        $html
     182                );
    180183        }
    181184
    182185        /**
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    diff --git src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php
    index afe37d8..f8e0d5d 100644
    class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { 
    111111                $option_value = BP_XProfile_ProfileData::get_value_byid( $this->field_obj->id, $args['user_id'] );
    112112                $options      = $this->field_obj->get_children();
    113113
    114                 $html = sprintf( '<div id="%s">', esc_attr( 'field_' . $this->field_obj->id ) );
     114                $html = '';
    115115
    116116                for ( $k = 0, $count = count( $options ); $k < $count; ++$k ) {
    117117
    class BP_XProfile_Field_Type_Radiobutton extends BP_XProfile_Field_Type { 
    154154                        $html .= apply_filters( 'bp_get_the_profile_field_options_radio', $new_html, $options[$k], $this->field_obj->id, $selected, $k );
    155155                }
    156156
    157                 echo $html . '</div>';
     157                printf( '<div id="%1$s" class="input-options radio-button-options">%2$s</div>',
     158                        esc_attr( 'field_' . $this->field_obj->id ),
     159                        $html
     160                );
    158161        }
    159162
    160163        /**