Ticket #5050 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

the_category and get_the_category_list should accept post ID as an argument

Reported by: filosofo Owned by: 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 Download (964 bytes) - added by filosofo 4 years ago.

Change History

  • Component changed from General to Template

comment:2   ryan4 years ago

  • Owner changed from anonymous to ryan

comment:3   ryan4 years ago

  • 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

Note: See TracTickets for help on using tickets.