WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22400, comment 2


Ignore:
Timestamp:
11/09/2012 11:23:27 PM (9 years ago)
Author:
Viper007Bond
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22400, comment 2

    initial v1  
    1 Having `$defaults` contain all valid parameters certainly help a lot but I still think `extract()` is bad.
     1Having `$defaults` contain all valid parameters certainly helps a lot but I still think `extract()` is bad.
    22
    33If I see `$foo` somewhere deep in the function, it's not immediately clear if this is a function-set value or a user-supplied value. Yes, I probably have to search either way to see where the variable comes from but by instead using `$args['foo']`, it's more clear that this is a configuration argument rather than just a data storage variable.