mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@37860 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -327,6 +327,8 @@ class WP_Meta_Query {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->table_aliases = array();
|
||||
|
||||
$this->meta_table = $meta_table;
|
||||
$this->meta_id_column = sanitize_key( $type . '_id' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user