[wp-trac] [WordPress Trac] #21949: Allow private taxonomies (public = false)

WordPress Trac noreply at wordpress.org
Wed Nov 18 01:08:25 UTC 2015


#21949: Allow private taxonomies (public = false)
--------------------------------+---------------------------
 Reporter:  wpsmith             |       Owner:  boonebgorges
     Type:  enhancement         |      Status:  closed
 Priority:  normal              |   Milestone:  4.4
Component:  Taxonomy            |     Version:
 Severity:  normal              |  Resolution:  fixed
 Keywords:  has-patch rest-api  |     Focuses:
--------------------------------+---------------------------

Comment (by jeremyfelt):

 Reopening for what looks to be the opposite of what was raised in
 [comment:37].

 Replying to [comment:19 boonebgorges]:
 > Also, I'm not sure I understand why nacin suggested an `is_admin()`
 exception. We don't appear to make a similar exception anywhere else when
 parsing the request, and I'm not sure what the justification would be. (If
 we need exceptions, they should probably be based on caps.) In any case,
 `parse_request()` doesn't run during a normal admin pageload. Maybe I'm
 missing something obvious here?

 This threw me for a bit of a loop today with a taxonomy that's only used
 to organize content in the admin.

 Given a taxonomy registered with:

 {{{
 array(
     'public' => false,
     'show_ui' => true,
     'show_in_menu' => true,
     'show_admin_column' => true,
 )
 }}}

 In 4.3.1:

 * `http://foo.bar/?custom_taxonomy=term_slug` - The query variable is
 ignored, as expected.
 * `http://foo.bar/wp-admin/edit.php?custom_taxonomy=term_slug` shows only
 posts from that taxonomy/term combo in the list table.

 In 4.4:

 * `http://foo.bar/?custom_taxonomy=term_slug` - The query variable is
 ignored, as expected.
 * `http://foo.bar/wp-admin/edit.php?custom_taxonomy=term_slug` shows all
 posts in the list table.

 I would expect that the posts list table continues to allow for filtering
 via the taxonomy/term in the admin without making the taxonomy public.

 I can also justify any meaning for the `public` argument when I stare at
 it too long, so it may be that just documenting this here is enough. :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21949#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list