WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#1302 closed defect (bug) (fixed)

Sort the_category() by cat name

Reported by: Denis de Bernardy Owned by: rob1n
Milestone: 2.2 Priority: low
Severity: trivial Version: 2.1
Component: Template Keywords: has-patch
Focuses: Cc:

Description

it would be nice if the_category() would list its output by name...

Attachments (1)

1302.diff (667 bytes) - added by rob1n 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 @Denis de Bernardy10 years ago

  • Patch set to No

comment:2 @rob1n9 years ago

  • Keywords dev-feedback 2nd-opinion added
  • Milestone set to 2.2
  • Owner changed from anonymous to rob1n
  • Priority changed from normal to low
  • Status changed from new to assigned
  • Summary changed from sort the_category() by cat name to Sort the_category() by cat name
  • Version changed from 1.5.1 to 2.1

I agree. It makes more sense. Or, at least an option of which column to sort by would be nice.

@rob1n9 years ago

comment:3 @rob1n9 years ago

  • Keywords has-patch added; dev-feedback 2nd-opinion removed

Apparently it was doing a sort() on an array of objects, which does nothing. I added a new callback function and changed the sort() call to a usort(). Should work now.

comment:4 @markjaquith9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4903]) properly sort categories by name for the_category(). Props rob1n. fixes #1302

Note: See TracTickets for help on using tickets.