bp_get_field_data_attribute( string|bool $attribute = false )
Return the data attribute for a field.
Description
Parameters
- $attribute
-
(Optional) Extra data to append to data attribute.
Default value: false
Return
(string)
Source
File: bp-xprofile/bp-xprofile-template.php
1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 | function bp_get_field_data_attribute( $attribute = false ) { global $profile_template ; $data_attribute = array (); $data_attribute [] = ' data-index="' . $profile_template ->field->field_order . '" ' ; /** * Filters the field data to be applied to a field. * * @since BuddyBoss 1.1.6 * * @param array $data_attribute Array of data attribute to be applied to field. Passed by reference. */ $data_attribute = apply_filters_ref_array( 'bp_field_data_attribute' , array ( & $data_attribute ) ); /** * Filters the data HTML attribute to be used on a field. * * @since BuddyBoss 1.1.6 * * @param string $value data HTML attribute with imploded data attributes. */ return apply_filters( 'bp_get_field_data_attribute' , implode( ' ' , $data_attribute ) . '"' ); } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.1.6 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.