Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Patch for optional callback arguments? #18
I have some hook methods that require an argument to be passed, and others that don't. I could just make them accept the argument, but they're used outside of hooks also so it doesn't really fit.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Ok. I thought about it and decided to leave it as it is.
Usually, people who write hook callbacks can do this if they're not interested in arguments.
In your case, you seem to reuse a method for both API and as a hook callback (which is good). I just don't understand why you would send parameters to the hook, then?