Skip to:
Content

BuddyPress.org

Changeset 11833


Ignore:
Timestamp:
01/28/2018 05:03:53 PM (2 years ago)
Author:
djpaul
Message:

Update bp_form_field_attributes() helper to support HTML5-style properties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template.php

    r11781 r11833  
    793793
    794794        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            }
    796803        }
    797804
Note: See TracChangeset for help on using the changeset viewer.