Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#12640 closed defect (bug) (invalid)

Check that the taxonomy exists (for that post type) in more places

Reported by: nacin Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:


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.

Change History (1)

#1 @nacin
6 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

Going to close. Better ticket would be "Treat tags and categories as regular taxonomies".

Note: See TracTickets for help on using tickets.