Make WordPress Core

Opened 16 years ago

Closed 12 years ago

#16223 closed enhancement (fixed)

post_class for public custom taxonomies

Reported by: sillybean Owned by: boonebgorges
Priority: normal Milestone: 4.2
Component: Taxonomy Version: 3.1
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses: template

Description

post_class() should include styles for custom taxonomies.

Attachments (3)

taxonomy-post-classes.diff​ (1.5 KB ) - added by sillybean 16 years ago.
Adds post classes for public custom taxonomies
taxonomy-post-classes2.diff​ (1.5 KB ) - added by sillybean 14 years ago.
Adds post classes for public custom taxonomies
taxonomy-post-classes3.diff​​ (1.4 KB ) - added by sillybean 13 years ago.

Download all attachments as: .zip

Change History (14)

#1 @nacin
16 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release

Nice enhancement. Can probably clean up the existing taxonomy code there in the process.

#2 @nacin
16 years ago

Going to leave the needs-patch on there. Let's reduce the code a bit.

We also need to check that we're hitting the cache on that.

#3 @sillybean
16 years ago

I thought so too, but it would change existing behavior, since tags print tag-name now and this would print post_tag-name. Could throw in an if just for tags, I guess.

#4 @nacin
16 years ago

Indeed.

#5 @sillybean
16 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Patch updated. This replaces the existing bits for categories and tags in a way that's consistent with the old behavior.

Not sure about the cache; this is more or less how it was done before.

@sillybean
16 years ago

Adds post classes for public custom taxonomies

#6 @sillybean
16 years ago

Finally found a moment to go through all the relevant functions, and it looks like they are hitting the cache whenever possible.

@sillybean
14 years ago

Adds post classes for public custom taxonomies

#7 @sillybean
14 years ago

Patch cleaned up and updated.

#8 @sillybean
13 years ago

Refreshed patch and cleaned up a taxonomy name/object error.

#9 @nacin
13 years ago

  • Component Template → Taxonomy
  • Focuses template added

#10 @boonebgorges
12 years ago

  • Milestone Future Release → 4.2

Following up: cache support looks good (demonstrated a unit test, coming up).

#11 @boonebgorges
12 years ago

  • Owner set to boonebgorges
  • Resolution → fixed
  • Status new → closed

In 31271:

Add classes for custom taxonomy terms in get_post_class().

Props sillybean.
Fixes #16223.

Note: See TracTickets for help on using tickets.