bp_get_search_input_name( string $component = '' )

Get the ‘name’ attribute for the search form input element.


Description Description


Parameters Parameters

$component

(Optional) Component name. Defaults to current component.

Default value: ''


Top ↑

Return Return

(string) Text for the 'name' attribute.


Top ↑

Source Source

File: bp-core/bp-core-template.php

function bp_get_search_input_name( $component = '' ) {
	if ( ! $component ) {
		$component = bp_current_component();
	}

	$bp = buddypress();

	$name = '';
	if ( isset( $bp->{$component}->id ) ) {
		$name = $bp->{$component}->id . '_search';
	}

	return $name;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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