WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 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:

Description

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 7 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 darkdragon6 years ago

  • Component changed from General to Template

comment:2 ryan6 years ago

  • Owner changed from anonymous to ryan

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