wp-handler icon indicating copy to clipboard operation
wp-handler copied to clipboard

Checking argument counts for callbacks

Open dashifen opened this issue 1 year ago • 1 comments

Too many times, I've used addAction or addFilter for a function that needs two or more arguments passed into its scope and forgotten to tell WordPress about that requirement. So, I've modified the isValidCallback method to do so. It will now indicate that a callback is invalid if the number of required parameters for a callback is less than the number of arguments WordPress is going to send it.

dashifen avatar Sep 18 '24 12:09 dashifen