Useful helper function, add_action_with_args()
|Reported by:||rzen||Owned by:|
About a year ago, Rarst released a plugin named Advanced Hooks API (http://wordpress.org/extend/plugins/advanced-hooks-api/) that adds a number of (experimental) wrappers that allow one to hook more elaborate events without coding intermediary functions. One of these wrappers in particular (add_action_with_args) would save theme and plugin devs an annoying amount of work writing dummy functions to simply hook a callback that requires a few specific params.
I pulled just that functionality out of his plugin, distilled it to it's simplest form, and added it in to plugin.php. I think this functionality has legs, and a number of others agree, but some are not convinced it has a home in core. I would LOVE to see it there, as I said it would eliminate a ton of unnecessary work, but I present it to you who are smarter than me to talk through why it should/shouldn't be.
Here are some sample use-cases: https://gist.github.com/3928941
Change History (21)
comment:12 @scribu — 3 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed