[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 07:42:36 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):

 Ok, interesting, but it seems like the problem is you were depending on
 tax queries querying all post_types ( which was the previous behavior ),
 whether or not they are currently registered for the given taxonomy.

 `switch_to_blog()` does not switch the entire environment see #14941 ,
 which means that even though you `switch_to_blog(2)` you are still running
 on the taxonomy registrations for blog 1.  Rationally so you will only get
 results of post_types that are registered to that taxonomy.

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


More information about the wp-trac mailing list