[wp-trac] [WordPress Trac] #9547: Taxonomy - interesting 'unused' term_order column in table term_relationships.

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 1 11:56:57 UTC 2012


#9547: Taxonomy - interesting 'unused' term_order column in table
term_relationships.
------------------------------------+-----------------------------
 Reporter:  michelwppi              |       Owner:  ryan
     Type:  feature request         |      Status:  reopened
 Priority:  high                    |   Milestone:  Future Release
Component:  Taxonomy                |     Version:  2.8
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------------

Comment (by simonwheatley):

 Replying to [comment:14 SergeyBiryukov]:
 > #14634 suggests adding `$args`.

 Thanks Sergey. I can see this being more flexible, though it does increase
 complexity and I wasn't sure if this kind of parameter was in the spirit
 of the WordPress template tags. I've added it as a separate patch to make
 things easier to compare (diffing diffs… fun).

 #9547-sw2.diff demonstrates```get_the_terms``` and ```get_the_term_list```
 with the ```$args``` parameter.

 A further caching caveat with this patch: If you pass an empty array in
 $args (as is the default) it will cache under a different key to a call
 where the ```$args``` param contains values equivalent to the defaults in
 ```wp_get_object_terms```. This is because the patch is MD5 hashing the
 serialised ```$args``` array. I can't think of a way around this without
 duplicating the defaults from ```wp_get_object_terms``` in
 ```get_the_terms``` (and I suspect in most cases the problem is not
 serious).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9547#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list