WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 months ago

#16223 new enhancement

post_class for public custom taxonomies

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

Description

post_class() should include styles for custom taxonomies.

Attachments (3)

taxonomy-post-classes.diff (1.5 KB) - added by sillybean 3 years ago.
Adds post classes for public custom taxonomies
taxonomy-post-classes2.diff (1.5 KB) - added by sillybean 19 months ago.
Adds post classes for public custom taxonomies
taxonomy-post-classes3.diff​ (1.4 KB) - added by sillybean 8 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 nacin3 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

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

comment:2 nacin3 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.

comment:3 sillybean3 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.

comment:4 nacin3 years ago

Indeed.

comment:5 sillybean3 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.

sillybean3 years ago

Adds post classes for public custom taxonomies

comment:6 sillybean3 years ago

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

sillybean19 months ago

Adds post classes for public custom taxonomies

comment:7 sillybean19 months ago

Patch cleaned up and updated.

comment:8 sillybean8 months ago

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

comment:9 nacin3 months ago

  • Component changed from Template to Taxonomy
  • Focuses template added
Note: See TracTickets for help on using tickets.