Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#38504 closed enhancement (fixed)

Term query endpoints should use `WP_Term_Query`

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

Description

Original ticket: ​https://github.com/WP-API/WP-API/issues/2740.

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. ​https://github.com/WP-API/WP-API/pull/2780

Attachments (1)

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

Download all attachments as: .zip

Change History (7)

@boonebgorges
10 years ago

#1 @boonebgorges
10 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
10 years ago

  • Version → trunk

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


10 years ago

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


10 years ago

#5 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Status new → 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
10 years ago

  • Resolution → fixed
  • Status assigned → 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.