Changes between Initial Version and Version 1 of Ticket #9547, comment 15
- 08/01/12 11:57:23 (17 months ago)
initial v1 4 4 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). 5 5 6 #9547-sw2.diffdemonstrates```get_the_terms``` and ```get_the_term_list``` with the ```$args``` parameter. 6 demonstrates```get_the_terms``` and ```get_the_term_list``` with the ```$args``` parameter. 7 7 8 8 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).