diff --git src/bp-xprofile/bp-xprofile-template.php src/bp-xprofile/bp-xprofile-template.php
index 8498c3f..a98cb72 100644
|
|
function bp_profile_group_has_fields() { |
382 | 382 | return $profile_template->has_fields(); |
383 | 383 | } |
384 | 384 | |
| 385 | /** |
| 386 | * Generate the CSS 'class=' statement for a field's container div. |
| 387 | * |
| 388 | * @since 1.0.0 |
| 389 | * |
| 390 | * @param array|string $class May be a string, comma-separated string or array. |
| 391 | * |
| 392 | * @return string |
| 393 | */ |
385 | 394 | function bp_field_css_class( $class = false ) { |
386 | 395 | echo bp_get_field_css_class( $class ); |
387 | 396 | } |
… |
… |
function bp_field_css_class( $class = false ) { |
391 | 400 | $css_classes = array(); |
392 | 401 | |
393 | 402 | if ( ! empty( $class ) ) { |
394 | | $css_classes[] = sanitize_title( esc_attr( $class ) ); |
| 403 | // Convert strings to an array. |
| 404 | if ( ! is_array( $class ) ) { |
| 405 | $class = explode( ',', $class ); |
| 406 | } |
| 407 | $css_classes = array_map( function( $item ){ |
| 408 | return sanitize_title( esc_attr( $item ) ); |
| 409 | }, $class ); |
395 | 410 | } |
396 | 411 | |
397 | 412 | // Set a class with the field ID. |