Ticket #5050 (closed enhancement: fixed)

Opened 10 months ago

Last modified 5 months ago

the_category and get_the_category_list should accept post ID as an argument

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

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

the_category_enhancement.diff (0.9 kB) - added by filosofo on 09/22/07 19:55:26.

Change History

09/22/07 19:55:26 changed by filosofo

  • attachment the_category_enhancement.diff added.

12/28/07 04:28:39 changed by darkdragon

  • component changed from General to Template.

02/14/08 21:06:15 changed by ryan

  • owner changed from anonymous to ryan.

02/18/08 17:46:26 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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