WordPress is not sending the 2nd email in the same request

The issue was not caused by WordPress. It was caused by a plugin. In this particular case, I checked the plugins installed looking for anything that could modify the mail behavior. I disabled the plugin “Email Templates” and started receiving all the messages normally. Then I noted that there was an update available for that … Read more

How to get an error message if a form is empty (plugin: Post for site) [closed]

You’ve already got a check for $_POST == empty. **if (!empty($_POST)){ $pfs = pfs_submit($_POST,$_FILES); echo json_encode($pfs); //echo “<pre style=\”border:1px solid #ccc;margin-top:5px;\”>”.print_r($pfs, true).”\n”; wp_redirect(“http://domda.se/tack/”); exit; } else { /* TODO: translate following */ _e(‘Den här sidan hade du inte behövt se, något är fel.’,’pfs_domain’); echo “<a href=””.get_bloginfo(“url’).”‘>” . __(‘Go home?’,’pfs_domain’) . “</a>”; }** Add an error … Read more

Can (slow) Internet speed get you a 500 server error? [closed]

No. 500 error will return when you have server error. PHP error, etc. See response code reference. The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error response is a generic “catch-all” response. Sometimes, server … Read more

How to use the password_reset hook to validate new password and display error

You can try using hook the validate_password_reset to validate password. Following code can be used to validate alphanumeric password. add_action(‘validate_password_reset’,’wdm_validate_password_reset’,10,2); function wdm_validate_password_reset( $errors, $user) { $exp = ‘/^(?=.*\d)((?=.*[a-z])|(?=.*[A-Z])).{6,32}$/’; if(strlen($_POST[‘pass1’])<6 || !preg_match($exp, $_POST[‘pass1’]) ) $errors->add( ‘error’, ‘Password must be alphanumeric and contain minimum 6 characters.’,”); }