Last active
January 30, 2017 18:49
-
-
Save xnau/4c1596e85a014f1a8f8724bfdab90c65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* adds a custom validation error message | |
* | |
* @param array $error_messages | |
* @return array | |
*/ | |
function xnau_add_url_validation_error_message( $error_messages ) | |
{ | |
// add our message with a placeholder for the field name | |
$error_messages['invalid url'] = 'You must provide a valid URL for the %s field.'; | |
return $error_messages; | |
} | |
add_filter( 'pdb-validation_error_messages', 'xnau_add_url_validation_error_message' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment