bp_directory_blogs_search_form()

Output the blog directory search form.


Source Source

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

function bp_directory_blogs_search_form() {

	$query_arg = bp_core_get_component_search_query_arg( 'blogs' );

	if ( ! empty( $_REQUEST[ $query_arg ] ) ) {
		$search_value = stripslashes( $_REQUEST[ $query_arg ] );
	} else {
		$search_value = bp_get_search_default_text( 'blogs' );
	}

	$search_form_html = '<form action="" method="get" id="search-blogs-form">
		<label for="blogs_search"><input type="text" name="' . esc_attr( $query_arg ) . '" id="blogs_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
		<input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
	</form>';

	/**
	 * Filters the output for the blog directory search form.
	 *
	 * @since 1.9.0
	 *
	 * @param string $search_form_html HTML markup for blog directory search form.
	 */
	echo apply_filters( 'bp_directory_blogs_search_form', $search_form_html );
}


Top ↑

User Contributed Notes User Contributed Notes

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