diff --git a/src/bp-core/bp-core-template.php b/src/bp-core/bp-core-template.php
index b7a4e41c7..a7ec55806 100644
|
a
|
b
|
function bp_form_field_attributes( $name = '', $attributes = array() ) { |
| 792 | 792 | $attributes = (array) apply_filters( 'bp_get_form_field_attributes', $attributes, $name ); |
| 793 | 793 | |
| 794 | 794 | foreach( $attributes as $attr => $value ) { |
| 795 | | $retval .= sprintf( ' %s="%s"', sanitize_key( $attr ), esc_attr( $value ) ); |
| | 795 | // Numeric keyed array. |
| | 796 | if (is_numeric( $attr ) ) { |
| | 797 | $retval .= sprintf( ' %s', esc_attr( $value ) ); |
| | 798 | |
| | 799 | // Associative keyed array. |
| | 800 | } else { |
| | 801 | $retval .= sprintf( ' %s="%s"', sanitize_key( $attr ), esc_attr( $value ) ); |
| | 802 | } |
| 796 | 803 | } |
| 797 | 804 | |
| 798 | 805 | return $retval; |
diff --git a/src/bp-xprofile/classes/class-bp-xprofile-field-type.php b/src/bp-xprofile/classes/class-bp-xprofile-field-type.php
index f282a826c..69fe89928 100644
|
a
|
b
|
abstract class BP_XProfile_Field_Type { |
| 509 | 509 | ) ); |
| 510 | 510 | |
| 511 | 511 | if ( bp_get_the_profile_field_is_required() ) { |
| | 512 | $r[] = 'required'; |
| 512 | 513 | $r['aria-required'] = 'true'; |
| 513 | 514 | } |
| 514 | 515 | |