Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#5050 closed enhancement (fixed)

the_category and get_the_category_list should accept post ID as an argument

Reported by: filosofo Owned by: ryan
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords: the_category get_the_category get_the_category_list has-patch
Focuses: Cc:


There are a number of times when it would be nice to get the categories for a post outside of the loop.

My patch allows one to specify the post id, with no back-compat issues, as get_the_category_list calls get_the_category, which already can accept post ID as an argument.

Attachments (1)

the_category_enhancement.diff (964 bytes) - added by filosofo 13 years ago.

Download all attachments as: .zip

Change History (4)

#1 @darkdragon
13 years ago

  • Component changed from General to Template

#2 @ryan
13 years ago

  • Owner changed from anonymous to ryan

#3 @ryan
13 years ago

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

(In [6899]) Add optional post ID arg to the_category and get_the_category_list. Props filosofo. fixes #5050

Note: See TracTickets for help on using tickets.