Prior to the introduction of `WP_Term_Query`, the 'orderby' clause passed to the 'terms_clauses' filter was prefixed by `ORDER BY`. After `WP_Term_Query`, this was not the case; `ORDER BY` was added after the filter. As such, plugins filtering 'terms_clauses' and returning an 'orderby' clause beginning with `ORDER BY` resulted in invalid syntax when `WP_Term_Query` prepended a second `ORDER BY` keyword to the clause. This changeset rearranges the way the 'orderby' clause is built so that it will be passed to 'terms_clauses' in the previous format. Fixes #37378. Built from https://develop.svn.wordpress.org/trunk@38099 git-svn-id: http://core.svn.wordpress.org/trunk@38040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
30 KiB
30 KiB