[wp-trac] [WordPress Trac] #21290: Post types continue to be selected after removal from custom taxonomy registration

WordPress Trac noreply at wordpress.org
Tue Dec 18 17:31:52 UTC 2012


#21290: Post types continue to be selected after removal from custom taxonomy
registration
--------------------------+---------------------------
 Reporter:  jondavidjohn  |       Owner:  jondavidjohn
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  3.5
Component:  Taxonomy      |     Version:  3.4.1
 Severity:  major         |  Resolution:  fixed
 Keywords:  close         |
--------------------------+---------------------------

Comment (by jondavidjohn):

 Not sure what you mean by *still* registered... again `switch_to_blog`
 does not change the environment, only the database the queries point at.

 When you are querying a taxonomy you are changing the defaults.  If you do
 a tax query for a taxonomy registered only to a custom post_type, you
 expect to get back posts instead of the type it's registered to?  That
 would be (was) confusing.  Maybe documentation needs to be updated, but
 this is decidedly a more logical and expected behavior.

 Also, this patch does not stomp explicitly given post_type's in the
 WP_Query, if you provide 'post' as a post type to the query, it will use
 that.

 It might be clearer to communicate your proposed solution via a patch.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21290#comment:29>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list