wpcf7_file_messages

The Contact Form 7 wpcf7 file messages function.

Description

wpcf7_file_messages( $messages ); 

Parameters (1)

0. $messages
The messages.

Usage

  1. if ( !function_exists( 'wpcf7_file_messages' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/file.php'; 
  3.  
  4. // The messages. 
  5. $messages = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpcf7_file_messages($messages); 
  9.  

Defined (1)

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

/modules/file.php  
  1. function wpcf7_file_messages( $messages ) { 
  2. return array_merge( $messages, array( 
  3. 'upload_failed' => array( 
  4. 'description' => __( "Uploading a file fails for any reason", 'contact-form-7' ),  
  5. 'default' => __( "There was an unknownerroruploading the file.", 'contact-form-7' ) 
  6. ),  
  7.  
  8. 'upload_file_type_invalid' => array( 
  9. 'description' => __( "Uploaded file is not allowed for file type", 'contact-form-7' ),  
  10. 'default' => __( "You are not allowed to upload files of this type.", 'contact-form-7' ) 
  11. ),  
  12.  
  13. 'upload_file_too_large' => array( 
  14. 'description' => __( "Uploaded file is too large", 'contact-form-7' ),  
  15. 'default' => __( "The file is too big.", 'contact-form-7' ) 
  16. ),  
  17.  
  18. 'upload_failed_php_error' => array( 
  19. 'description' => __( "Uploading a file fails for PHP error", 'contact-form-7' ),  
  20. 'default' => __( "There was anerroruploading the file.", 'contact-form-7' ) 
  21. ) );