BBP_BuddyPress_Members::set_member_forum_query_vars()
Set favorites and subscriptions query variables if viewing member profile pages.
Description
Return
(If) not viewing your own profile
Source
File: bp-forums/members.php
public function set_member_forum_query_vars() { // Special handling for forum component if ( ! bp_is_my_profile() ) return; global $wp_query; // 'favorites' action if ( bbp_is_favorites_active() && bp_is_current_action( bbp_get_user_favorites_slug() ) ) { $wp_query->bbp_is_single_user_favs = true; // 'subscriptions' action } elseif ( bbp_is_subscriptions_active() && bp_is_current_action( bbp_get_user_subscriptions_slug() ) ) { $wp_query->bbp_is_single_user_subs = true; } }
Changelog
Version | Description |
---|---|
bbPress (r4615) | 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.