Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#22912 closed defect (bug) (wontfix)

Remove "post-format-" Prefix From Format Terms

Reported by: ryanve Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: close
Focuses: Cc:


WP's post formats use the taxonomy API under the taxonomy name "post_format". If you use get_the_terms( $id, 'post_format' ) to access the terms, they are prefixed with "post-format-" ( e.g. "post-format-quote" ). This seems inconsistent with how terms are designed to work. The term is designed to be only the term. It should not include the name of the taxonomy in it. Having inconsistencies like this makes it harder to use taxonomies at scale.

Change History (5)

#1 @markoheijnen
8 years ago

  • Keywords close added

This taxonomy isn't there to scale since it has a default set you can't extend.
The reason it has that prefix is because term slugs are unique to all taxonomy's and not just one when Post Format has been introduced. This will change but you still have all the existing site's using it.

#2 @johnbillion
8 years ago

It's also done to avoid clashes with other terms. See #5809.

#3 @ryanve
8 years ago

@markoheijnen When I said scale I meant doing stuff like printing CSS classes based on the all supported taxonomies without having to give special treatment to certain taxonomies.

#4 @ryanve
8 years ago

@johnbillion It would be better to fix #5809 than to require workarounds on every taxonomy.

#5 @nacin
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.