[wp-trac] [WordPress Trac] #37151: WP_Term_Query not honoring orderby meta_value_num
WordPress Trac
noreply at wordpress.org
Sat Jun 25 16:22:58 UTC 2016
#37151: WP_Term_Query not honoring orderby meta_value_num
-------------------------------------+---------------------------
Reporter: littler.chicken | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.6
Component: Taxonomy | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------------
Changes (by boonebgorges):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"37860"]:
{{{
#!CommitTicketReference repository="" revision="37860"
Fix orderby meta handling for `WP_Term_Query`.
In order to allow meta-related values of `orderby` to be handled properly,
the term query's `meta_query` object must run its `get_sql()` method
before
`orderby` parsing.
Fixing this bug required addressing another bug in `WP_Meta_Query`, which
caused the table alias index not to be reset when calling `get_sql()`
multiple times on the same object.
Props littler.chicken.
Fixes #37151.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37151#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list