bp_nouveau_search_object_data_attr( string $attr = '' )
Output the search form data-bp attribute.
Description Description
Parameters Parameters
- $attr
-
(Optional) The data-bp attribute.
Default value: ''
Return Return
(string) The data-bp attribute.
Source Source
File: bp-templates/bp-nouveau/includes/template-tags.php
function bp_nouveau_search_object_data_attr( $attr = '' ) {
$objects = bp_nouveau_get_search_objects();
if ( ! isset( $objects['secondary'] ) ) {
return $attr;
}
if ( bp_is_active( 'groups' ) && bp_is_group_members() ) {
$attr = join( '_', $objects );
} else {
$attr = $objects['secondary'];
}
echo esc_attr( $attr );
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |