bbp_view_query( string $view = '', mixed $new_args = '' )

Run the view’s query

Description

Parameters

$view

(Optional) View id

Default value: ''

$new_args

(Optional) New arguments. See bbp_has_topics()

Default value: ''

Return

(bool) False if the view doesn't exist, otherwise if topics are there

Source

File: bp-forums/core/functions.php

function bbp_view_query( $view = '', $new_args = '' ) {

	$view = bbp_get_view_id( $view );
	if ( empty( $view ) )
		return false;

	$query_args = bbp_get_view_query_args( $view );

	if ( !empty( $new_args ) ) {
		$new_args   = bbp_parse_args( $new_args, '', 'view_query' );
		$query_args = array_merge( $query_args, $new_args );
	}

	return bbp_has_topics( $query_args );
}

Changelog

Changelog
Version Description
bbPress (r2789) 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.