<?php
$search_class = array('bp-search');
$search_data_attr = esc_attr(join('-', $args['object']));
$search_name_attr = esc_attr(join('_', $args['object']));
foreach ($args['object'] as $search_obj) {
	$search_class []= $search_obj . '-search';
}
$search_class = esc_attr(join(' ', $search_class));
?>

<div class="<?php echo $search_class; ?> bp-search" data-bp-search="<?php echo esc_attr($args['search-id']); ?>">
	<form action="" method="get" class="bp-dir-search-form" role="search">

		<button type="submit" id="<?php echo $search_data_attr; ?>-search-submit" class="nouveau-search-submit communityally-search-submit" name="<?php echo $search_name_attr; ?>_search_submit">
			<span class="dashicons dashicons-search" aria-hidden="true"></span>
			<span id="button-text" class="bp-screen-reader-text"><?php echo esc_html_x( 'Search', 'button', 'buddypress' ); ?></span>
		</button>

		<input id="<?php echo $search_data_attr; ?>-search" name="<?php echo $search_name_attr; ?>" type="search"  class="communityally-search" placeholder="<?php echo esc_attr($args['default-search-text']); ?>" />

	</form>
</div>
