boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Don't run access query protection when querying `pagename` #624

Closed boonebgorges closed 6 years ago

boonebgorges commented 6 years ago

pagename queries don't have an explicit post_type, so they aren't excluded from the general-access query by our current logic. However, pagename queries without an explicit post_type can never return a bp_doc, so there's no need to do the query here.

Related: #618

dcavins commented 6 years ago

Nice catch! I like the elseif structure better than the old multiline || check, too.