BBP_Topics_Admin::filter_post_rows( array $query_vars )

Adjust the request query and include the forum id

Description

Parameters

$query_vars

(Required) Query variables from WP_Query

Return

(array) Processed Query Vars

Source

File: bp-forums/admin/topics.php

	function filter_post_rows( $query_vars ) {

		if ( $this->bail() ) return $query_vars;

		// Add post_parent query_var if one is present
		if ( !empty( $_GET['bbp_forum_id'] ) ) {
			$query_vars['meta_key']   = '_bbp_forum_id';
			$query_vars['meta_value'] = $_GET['bbp_forum_id'];
		}

		// Return manipulated query_vars
		return $query_vars;
	}

Changelog

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