[wp-trac] [WordPress Trac] #35089: Query var on non-public taxonomy remains boolean true since [35333]

WordPress Trac noreply at wordpress.org
Sun Dec 27 16:42:37 UTC 2015

#35089: Query var on non-public taxonomy remains boolean true since [35333]
 Reporter:  johnbillion   |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4.1
Component:  Taxonomy      |     Version:  4.4
 Severity:  normal        |  Resolution:  fixed
 Keywords:  fixed-major   |     Focuses:
Changes (by boonebgorges):

 * status:  reopened => closed
 * resolution:   => fixed


 In [changeset:"36109"]:
 #!CommitTicketReference repository="" revision="36109"
 Force non-public taxonomies to have a query_var of `false`.

 [35333] implemented `public=false` for taxonomies. The implementation
 non-public taxonomies from having their archives accessed via query_var
 a normal request. But it didn't prevent non-public taxonomies from
 their query vars in the `$wp_taxonomies` global. The latter implementation
 details causes problems specifically when a taxonomy is registered with
 `query_var=true`; for public taxonomies, `register_taxonomy()` translates
 into a query_var equivalent to the taxonomy name, but in the case of non-
 taxonomies, the query_var was set to the boolean itself. The boolean then
 causes problems when using non-strict comparison to filter taxonomy
 objects by
 query_var, as when using `get_taxonomies()`.

 This changeset addresses the issue by forcing the query_var property of
 non-public taxonomies to `false`.

 Merges [36108] to the 4.4 branch.

 Fixes #35089.

Ticket URL: <https://core.trac.wordpress.org/ticket/35089#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list