[wp-trac] [WordPress Trac] #33369: Cannot intelligently target using the `get_terms_args` filter

WordPress Trac noreply at wordpress.org
Fri Aug 14 02:45:39 UTC 2015


#33369: Cannot intelligently target using the `get_terms_args` filter
-----------------------------------+------------------------------
 Reporter:  johnjamesjacoby        |       Owner:
     Type:  feature request        |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Taxonomy               |     Version:  2.2
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------

Comment (by knutsp):

 Replying to [comment:4 johnjamesjacoby]:

 Great answer, thank you.

 > The reason filters exist is to allow for overriding the environment and
 it's relative variables.

 I can't tell how much I agree with that, especially as a plugin developer.

 I have always, naively, believed that (well documented) default arguments
 could really be omitted and explicitly adding them seen as completely
 redundant, like a well implemented shorthand technique. This is from a
 template developers view, where one might use `get_terms()`. And as such,
 I fully accept the function return may be filtered. Filtered on basis of
 context and variables available, but not on the chosen programming
 technique.

 All I want is complete predictability, and maintain that documented
 defaults allow for shorthand coding. Even if Core is not perfect at that,
 as it is.

 Looking forward to more opinions.

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


More information about the wp-trac mailing list