[wp-trac] [WordPress Trac] #26963: wp_get_object_terms using wrong orderby statement

WordPress Trac noreply at wordpress.org
Sun Feb 2 01:21:14 UTC 2014


#26963: wp_get_object_terms using wrong orderby statement
-------------------------------+------------------------------
 Reporter:  danielvonmitschke  |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Taxonomy           |     Version:  3.8
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by bcworkz):

 * type:  defect (bug) => enhancement


Comment:

 I've no idea why one is filterable and one is not. I would guess
 `get_terms()` is a low level generic function where filterability is part
 of the function's design. `wp_get_object_terms()` is a more specialized
 function where plenty of reasonable options are provided, so there is
 little need for filters. The only columns that can't be ordered by are
 most of the IDs. Even then, the term ID is an available option.

 Still, it would be easy to add a filter or two. If we put filters
 everywhere someone might possibly like to use one, WordPress would become
 rather bloated, so adding more filters should demonstrate it would benefit
 a reasonable number of people. I'm not making a judgment one way or the
 other here.

 I am changing the ticket type from bug to enhancement though.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26963#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list