Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#4558 closed enhancement (fixed)

Allow category names in in_category()

Reported by: robmil's profile robmil Owned by: robmil's profile robmil
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3
Component: Administration Keywords: has-patch
Focuses: Cc:


Currently, in_category() only accepts the ID of a category, whereas is_category() accepts IDs, slugs and names. I think it's useful to be able to check if a post is in a given category based on its name as well as its ID, personally.

Attachments (1)

4558.diff (527 bytes) - added by robmil 17 years ago.

Download all attachments as: .zip

Change History (3)

17 years ago

#1 @ryan
17 years ago

  • Milestone changed from 2.3 to 2.4

#2 @westi
16 years ago

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

(In [7030]) Support category names in in_category(). Fixes #4558 props robmil.

Note: See TracTickets for help on using tickets.