boonebgorges / invite-anyone

Invite Anyone - Expands on BuddyPress's invitation features
http://teleogistic.net/code/buddypress/invite-anyone
29 stars 29 forks source link

Non-publicly-queryable utility taxonomies break some lookups #141

Closed boonebgorges closed 7 years ago

boonebgorges commented 7 years ago

Friend requests sent at account activation are set up like this:

$invitations = new WP_Query( array(
     ...
     'ia_invitees' => $invitees
     ...
) );

In 91f7fc769184c1fc29d0f0057affb6b60be99272, 'ia_invitees' was marked as public=false, which means that this query var is discarded. The result is that all invitations are returned (that match the other params).

Looking at WP::parse_request(), I'm not sure it's possible to make a taxonomy queryable in the way described above while also preventing access to it via URL, though I need to dig into it a bit more.

boonebgorges commented 7 years ago

It looks like it's possible to bypass the query_var stuff by using a tax_query instead.

boonebgorges commented 7 years ago

Looks like this only affects the invitees tax, so I'm marking this resolved.