bp_nouveau_search_object_data_attr( string $attr = '' )

Output the search form data-bp attribute.


Parameters Parameters

$attr

(string) (Optional) The data-bp attribute.

Default value: ''


Top ↑

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 );
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.