bbp_get_search_pagination_base()

Return the base URL used inside of pagination links


Description Description


Return Return

(string)


Top ↑

Source Source

File: includes/search/template.php

function bbp_get_search_pagination_base() {

	// If pretty permalinks are enabled, make our pagination pretty
	if ( bbp_use_pretty_urls() ) {

		// Shortcode territory
		if ( is_page() || is_single() ) {
			$base = get_permalink();

		// Default search location
		} else {
			$base = bbp_get_search_results_url();
		}

		// Add pagination base
		$base = trailingslashit( $base ) . user_trailingslashit( bbp_get_paged_slug() . '/%#%/' );

	// Unpretty permalinks
	} else {
		$base = add_query_arg( 'paged', '%#%' );
	}

	// Filter & return
	return apply_filters( 'bbp_get_search_pagination_base', $base );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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