Thanks for responding, Chad, and for the great plugin.
Sorry for the erroneous ticket, and yes, the documentation was what was confusing me me. Having worked with several similar filters for this plugin (e.g., wpmem_login_form_args), I’ve been including $args
as an argument, and assumed I was modifying and returning that array. I think I need to check back through my code to be sure I’m using all the _args
filters correctly. This was the first case in which I was getting an error from passing that parameter.
For example, wpmem_login_form_args documentation says it’s taking in $args
and returning a modified array. Now I think this is also wrong. Is there (or should there be) a standard API for all of these types of filters?
EDIT: Now I went back and put a breakpoint in wpmem_msg_dialog_arr. In this case, $args
(listed as required) is definitely being passed in. I see that this method is suffixed with _arr
, not _args
, so that might be my confusion. The example, in this case, is clear that I need to assign new values to specific array members, and not create and return a new array.
Also, note, in your revised documentation for wpmem_login_failed_args, you now have a “required” return value.
Return
$args
(array) (required) An array of arguments that are to override form $defaults.
Oh, and thanks for the tip on trac. Your plugin was not available in the list of plugins to attach to the ticket, so I wasn’t clear on how the association was even made, or if you’d get alerted.
Regards,
Josh
-
This reply was modified 6 years, 2 months ago by
Josh68.