[wp-trac] [WordPress Trac] #40496: get_the_terms() doesn't respect register_taxonomy()'s 'orderby' => 'term_order'
WordPress Trac
noreply at wordpress.org
Fri Apr 21 15:57:21 UTC 2017
#40496: get_the_terms() doesn't respect register_taxonomy()'s 'orderby' =>
'term_order'
-------------------------------------+--------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.5
Component: Taxonomy | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+--------------------
Changes (by boonebgorges):
* keywords: needs-patch => has-patch needs-testing
Comment:
Yes, totally my fault. This argument merging was omitted when
`wp_get_object_terms()` was refactored to use `WP_Term_Query`.
In my (lame) defense, I had no idea that this weird feature existed - it
was introduced in [7520], doesn't appear to be documented anywhere, and is
a pattern I've never seen used elsewhere in WordPress. It's not the worst
idea to have taxonomy-specific query arguments (or post types, for that
matter!), but perhaps we should advertise it better.
[attachment:40496.diff] appears to resolve the problem by restoring the
argument-merging from pre-4.7. @danielbachhuber Care to have a look?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40496#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list