This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_Search::search_page_search_url( $default = true )

function to return full search url, added with search terms and other filters

Description

Source

File: bp-search/classes/class-bp-search.php

		private function search_page_search_url( $default = true ) {

			if ( true == $this->search_args['forum_search'] ) {
				//Full search url for bbpress forum search
				if ( true === $default ) {
					$base_url = bbp_get_search_url( false );
				} else {
					$base_url = bbp_get_search_url( false ) . $this->search_args['search_term'];
				}

				if ( true === $this->search_args['forum_search'] ) {
					$full_url = esc_url( $base_url );
				} else {
					$full_url = esc_url( add_query_arg( 'bbp_search', urlencode( $this->search_args['search_term'] ), $base_url ) );
				}

			} else {
				$base_url = $this->search_page_url();
				$full_url = esc_url( add_query_arg( 's', urlencode( stripslashes( $this->search_args['search_term'] ) ), $base_url ) );
				//for now we only have one filter in url
			}

			return $full_url;
		}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.