Created
January 29, 2015 13:05
-
-
Save danielpowney/d3cdf1fa74ff163edbcb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function my_custom_comment_form_validation( $validation_results ) { | |
array_push( $validation_results, array( | |
'severity' => 'error', | |
'name' => 'my_custom_error2', | |
'field' => null, | |
'message' => __( 'My custom error 1', 'my-text-domain' ) | |
) ); | |
return $validation_results; | |
} | |
add_filter( 'mrp_after_comment_form_validation', 'my_custom_comment_form_validation', 10, 1 ); | |
function my_custom_rating_form_save_validation( $validation_results, $data ) { | |
array_push( $validation_results, array( | |
'severity' => 'error', | |
'name' => 'my_custom_error2', | |
'field' => null, | |
'message' => __( 'My custom error 2', 'my-text-domain' ) | |
) ); | |
return $validation_results; | |
} | |
add_filter( 'mrp_after_rating_form_validation_save', 'my_custom_rating_form_save_validation', 10, 2 ); | |
function my_custom_rating_form_update_validation( $validation_results, $data ) { | |
array_push( $validation_results, array( | |
'severity' => 'error', | |
'name' => 'my_custom_error3', | |
'field' => null, | |
'message' => __( 'My custom error 3', 'my-text-domain' ) | |
) ); | |
return $validation_results; | |
} | |
add_filter( 'mrp_after_rating_form_validation_update', 'my_custom_rating_form_update_validation', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment