Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#38504 closed enhancement (fixed)

Term query endpoints should use `WP_Term_Query`

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: has-patch
Focuses: Cc:


Original ticket:

A PR was approved on WP-API for this ticket, but was blocked by the core merge. Now that the merge is done, work can continue here.

Attachments (1)

38504.diff (5.3 KB) - added by boonebgorges 7 years ago.

Download all attachments as: .zip

Change History (7)

7 years ago

#1 @boonebgorges
7 years ago

  • Keywords has-patch added

38504.diff ports the PR to trunk. A few variable names and other miscellany changed in the interim, so I'd like a review. Ping @rachelbaker or @joehoyle

#2 @johnbillion
7 years ago

  • Version set to trunk

This ticket was mentioned in Slack in #core by stevenkword. View the logs.

7 years ago

This ticket was mentioned in Slack in #core by helen. View the logs.

7 years ago

#5 @boonebgorges
7 years ago

  • Owner set to boonebgorges
  • Status changed from new to assigned

In the interest of making beta, I'm going to rereview and commit this. It is only a minor modification to a previously approved PR. If there are problems, we'll fix them as bugs.

#6 @boonebgorges
7 years ago

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

In 38974:

REST API: Use wp_get_object_terms() when fetching terms for a post object.

The WP-API plugin originally used a custom method for fetching object
terms in a way that supported the object cache and also accepted all
parameters for get_terms(). In [38667], the internals of
wp_get_object_terms() were modified to use WP_Term_Query, thus
delivering in a native fashion the features that the API had
previously achieved bespokely.

Fixes #38504.

Note: See TracTickets for help on using tickets.