[wp-trac] [WordPress Trac] #12640: Check that the taxonomy exists (for that post type) in more places

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 18 22:57:44 UTC 2010


#12640: Check that the taxonomy exists (for that post type) in more places
--------------------------+-------------------------------------------------
 Reporter:  nacin         |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Post Types    |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 I just tried to unregister the category taxonomy ({{{ unset(
 $wp_taxonomies['category'] ); }}} on init, more or less) for posts.

 This is how I found [13759], as the tags column disappeared.

 We should modify get_post_class() to check if the object is in the
 taxonomy first, as custom post types may want to utilize that.

 ----

 Other notes:

 Template tags, for the most part, return empty strings on failure, but
 judging by the number of PHP errors I got, there were some issues in those
 and elsewhere.

 I'd like to think that twentyten should do more checking, but that makes
 the theme functions even more complicated than they already are.

 Unregistering categories only for posts (leaving the taxonomy itself
 intact) it seems to prevent most errors.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12640>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list