WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#15835 closed enhancement (fixed)

wp_get_object_terms: allow slugs option in fields argument

Reported by: lancewillett Owned by: ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.1
Component: Taxonomy Keywords: has-patch
Focuses: Cc:

Description

wp_get_object_terms allows a field argument with options for 'all', 'ids', and 'names' — but doesn't allow 'slugs.'

Attached patch adds support for 'slugs' as a field option.

Attachments (2)

taxonomy.php.diff (1.1 KB) - added by lancewillett 5 years ago.
15835.patch (1.1 KB) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (10)

@lancewillett5 years ago

comment:1 @westi5 years ago

  • Keywords 3.2-early added
  • Milestone changed from Awaiting Review to Future Release

Patch looks great.

comment:2 @lancewillett4 years ago

  • Cc lance@… added

This patch is up to date (checked it again today) so should be good to go for 3.2.

@SergeyBiryukov4 years ago

comment:3 @SergeyBiryukov4 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.3

Refreshed for 3.3.

comment:5 @ryan4 years ago

  • Keywords needs-unit-tests added

comment:7 @ryan4 years ago

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

In [18603]:

Support fields = slugs in wp_get_object_terms(). Props lancewillett, SergeyBiryukov. fixes #15835

comment:8 @SergeyBiryukov4 years ago

  • Keywords needs-unit-tests removed
Note: See TracTickets for help on using tickets.