Skip to:
Content

BuddyPress.org

Ticket #7083: 7083.01.diff

File 7083.01.diff, 973 bytes (added by dcavins, 8 years ago)

Xprofile checkboxes: add div wrapping options

  • 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..28f85bd 100644
    class BP_XProfile_Field_Type_Checkbox extends BP_XProfile_Field_Type { 
    122122
    123123                $option_values = ( $option_values ) ? (array) $option_values : array();
    124124
    125                 $html = '';
     125                $html = sprintf( '<div id="%s">', esc_attr( 'field_' . $this->field_obj->id ) );
    126126
    127127                // Check for updated posted values, but errors preventing them from
    128128                // being saved first time.
    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                echo $html . '</div>';
    180180        }
    181181
    182182        /**