[wp-trac] Re: [WordPress Trac] #9004: More filtering in get_terms() and wp_generate_tag_cloud()

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 21 18:53:32 GMT 2009


#9004: More filtering in get_terms() and wp_generate_tag_cloud()
--------------------------+-------------------------------------------------
 Reporter:  jhodgdon      |       Owner:  ryan                       
     Type:  defect (bug)  |      Status:  new                        
 Priority:  normal        |   Milestone:  2.8                        
Component:  Taxonomy      |     Version:  2.7                        
 Severity:  normal        |    Keywords:  taxonomy, filter, has-patch
--------------------------+-------------------------------------------------

Comment(by jhodgdon):

 I'm not sure why it's better to pass an array, really... If you are
 worried about a particular string being duplicated, in your filter
 implementation, you could do a regexp match to make sure it isn't already
 there.

 Anyway, I don't feel too strongly one way or the other, and if your
 version gets committed, I should be able to do a test in my current filter
 implementation to see if someone is using 2.7 with my version of the patch
 (I currently distribute it with my plugin, in case someone wants their
 categories/tags to be sorted correctly), or 2.8 with your version, by
 checking to see if the input is an array or a string.

 That said, I haven't tested the patch from filosofo yet. It does change
 how the core WP function get_terms() generates its query, so it should
 definitely be tested to make sure all the get_terms stuff still works
 (even without any filters actually defined by plugins).  The patch I
 originally submitted doesn't make any changes to the core function's query
 generation.

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


More information about the wp-trac mailing list