[wp-trac] [WordPress Trac] #21949: Allow private taxonomies (public = false)
WordPress Trac
noreply at wordpress.org
Tue Oct 13 04:30:57 UTC 2015
#21949: Allow private taxonomies (public = false)
--------------------------------+---------------------------
Reporter: wpsmith | Owner: boonebgorges
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.4
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch rest-api | Focuses:
--------------------------------+---------------------------
Comment (by boonebgorges):
Hi @mboynes - Rereading the above, I think I misunderstood what was being
suggested. Rewrite rules and query vars are registered separately. And
post types do indeed use the technique you've suggested for deciding
whether to register the query var - they use the new
`is_post_type_viewable()`.
We still need to keep some logic in `parse_request()` to detect whether
the nonpublic taxonomy is set as the value of 'taxonomy' - this can't be
handled at the time that the taxonomy is registered. It's a bit awkward to
have the 'public' protection in two different places depending on the
query var structure, but I think it's what we have to do if we want to
allow the registration of custom query vars that match nonpublic taxonomy
names. See [21949.3.diff].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21949#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list