bbp_get_search_url()

Return the search url


Description Description


Return Return

(string) Search url


Top ↑

Source Source

File: includes/search/template.php

	function bbp_get_search_url() {

		// Pretty permalinks
		if ( bbp_use_pretty_urls() ) {

			// Run through home_url()
			$url = bbp_get_root_url() . bbp_get_search_slug();
			$url = user_trailingslashit( $url );
			$url = home_url( $url );

		// Unpretty permalinks
		} else {
			$url = add_query_arg( array(
				bbp_get_search_rewrite_id() => ''
			), home_url( '/' ) );
		}

		// Filter & return
		return apply_filters( 'bbp_get_search_url', $url );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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