Changes between Initial Version and Version 1 of Ticket #33369, comment 3
- Timestamp:
- 08/14/2015 12:37:51 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33369, comment 3
initial v1 1 1 It could be argued that a function using defaults should return the same result when the argument was explicit and equal to the default, as when (deliberately) omitted. My trust in the documentation of a function would be damaged if I found this not to be true. 2 2 3 In other words, I think `get_terms( 'mytax', array( 'order y' => 'name' ) )` and `get_terms( 'mytax' )` should return the same results when called in the same context, regardless of any filter.3 In other words, I think `get_terms( 'mytax', array( 'orderby' => 'name' ) )` and `get_terms( 'mytax' )` should return the same results when called in the same context, regardless of any filter. 4 4 5 5 That is why I'm not sure that filters really should be informed on how the arguments was given, only their value after merging with defaults. The way WordPress uses `wp_parse_args()` resembles that of PHP when using optional arguments.