bbp_add_view_all( string $original_link = '', bool $force = false )

Append ‘view=all’ to query string if it’s already there from referer

Description

Parameters

$original_link

(Optional) Original Link to be modified

Default value: ''

$force

(Optional) Override bbp_get_view_all() check

Default value: false

Return

(string) The link with 'view=all' appended if necessary

Source

File: bp-forums/common/functions.php

function bbp_add_view_all( $original_link = '', $force = false ) {

	// Are we appending the view=all vars?
	if ( bbp_get_view_all() || !empty( $force ) ) {
		$link = add_query_arg( array( 'view' => 'all' ), $original_link );
	} else {
		$link = $original_link;
	}

	return apply_filters( 'bbp_add_view_all', $link, $original_link );
}

Changelog

Changelog
Version Description
bbPress (r3325) Introduced.

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.