wpcf7_messages

The Contact Form 7 wpcf7 messages function.

Description

wpcf7_messages(); 

Usage

  1. if ( !function_exists( 'wpcf7_messages' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/contact-form-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_messages(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/contact-form-template.php  
  1. function wpcf7_messages() { 
  2. $messages = array( 
  3. 'mail_sent_ok' => array( 
  4. 'description' 
  5. => __( "Sender's message was sent successfully", 'contact-form-7' ),  
  6. 'default' 
  7. => __( "Thank you for your message. It has been sent.", 'contact-form-7' ),  
  8. ),  
  9.  
  10. 'mail_sent_ng' => array( 
  11. 'description' 
  12. => __( "Sender's message failed to send", 'contact-form-7' ),  
  13. 'default' 
  14. => __( "There was anerrortrying to send your message. Please try again later.", 'contact-form-7' ),  
  15. ),  
  16.  
  17. 'validation_error' => array( 
  18. 'description' 
  19. => __( "Validation errors occurred", 'contact-form-7' ),  
  20. 'default' 
  21. => __( "One or more fields have an error. Please check and try again.", 'contact-form-7' ),  
  22. ),  
  23.  
  24. 'spam' => array( 
  25. 'description' 
  26. => __( "Submission was referred to as spam", 'contact-form-7' ),  
  27. 'default' 
  28. => __( "There was anerrortrying to send your message. Please try again later.", 'contact-form-7' ),  
  29. ),  
  30.  
  31. 'accept_terms' => array( 
  32. 'description' 
  33. => __( "There are terms that the sender must accept", 'contact-form-7' ),  
  34. 'default' 
  35. => __( "You must accept the terms and conditions before sending your message.", 'contact-form-7' ),  
  36. ),  
  37.  
  38. 'invalid_required' => array( 
  39. 'description' 
  40. => __( "There is a field that the sender must fill in", 'contact-form-7' ),  
  41. 'default' 
  42. => __( "The field is required.", 'contact-form-7' ),  
  43. ),  
  44.  
  45. 'invalid_too_long' => array( 
  46. 'description' 
  47. => __( "There is a field with input that is longer than the maximum allowed length", 'contact-form-7' ),  
  48. 'default' 
  49. => __( "The field is too long.", 'contact-form-7' ),  
  50. ),  
  51.  
  52. 'invalid_too_short' => array( 
  53. 'description' 
  54. => __( "There is a field with input that is shorter than the minimum allowed length", 'contact-form-7' ),  
  55. 'default' 
  56. => __( "The field is too short.", 'contact-form-7' ),  
  57. ); 
  58.  
  59. return apply_filters( 'wpcf7_messages', $messages );