Small modification suggestion
-
Thanks for the nice lightweight plugin.
Initially I was having some problems with it – I would try to submit a message on the contact form page, but it would respond with a “1” in a red box. However, the message still got sent.
After digging around a bit, it seems that I had something (most likely in my plugin inventory) which had output a newline before the AJAX handler in inc/ef-ajax.php had been called. This was then throwing off the check for a plain “1” (without newlines) in essential-form.php, and making it think the call had failed.
Would it be possible to add something like the following just before the “echo wp_mail()” call in ef-ajax.php? This should flush any extraneous buffered output before the echo. I know it’s not a problem with your plugin per-se, but it might fix some edge cases like this where other plugins etc. are not behaving properly.if ( ob_get_length() ) { ob_clean(); }
You must be logged in to reply to this topic.