[wp-trac] [WordPress Trac] #26963: wp_get_object_terms using wrong orderby statement
WordPress Trac
noreply at wordpress.org
Fri Jan 31 12:56:11 UTC 2014
#26963: wp_get_object_terms using wrong orderby statement
-------------------------------+------------------------------
Reporter: danielvonmitschke | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.8
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Changes (by danielvonmitschke):
* keywords: reporter-feedback =>
Comment:
Sorry, I just learned that the term_order column in the terms table was
actually added by a plugin.
So I still was wondering why the ordering works with get_terms and not
with wp_get_object_terms.
It seems that the plugin is using the 'get_terms_orderby' filter hook to
alter the orderby-sql-statement in get_terms.
I think it would not hurt to add such a hook to wp_get_object_terms.
For instance:
{{{
$orderby = apply_filters('wp_get_object_terms_orderby', $orderby, $args,
$taxonomies, $object_ids);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26963#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list