Custom Error Message
-
Are there any error message hooks which I could use to display custom error messages if for e.g when insert of data to database fail?
Currently using:
$result = $wpdb->query($sql); if(!$result) { $wpcf7->skip_mail = true; $error = 'An error has occurred. Please contact the administrator for assistance. <br />Error: '.$wpdb->last_error; $omsg = 'return "'. $error .'";'; add_filter('wpcf7_display_message', create_function('$a', $omsg)); }
that shows the message in green. Any ways to make the message shown on the front end red instead?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom Error Message’ is closed to new replies.