wpcf7_init_uploads

File uploading functions.

Description

wpcf7_init_uploads(); 

Usage

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

Defined (1)

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

/modules/file.php  
  1. function wpcf7_init_uploads() { 
  2. wp_mkdir_p( $dir ); 
  3.  
  4. $htaccess_file = trailingslashit( $dir ) . '.htaccess'; 
  5.  
  6. if ( file_exists( $htaccess_file ) ) { 
  7. return; 
  8.  
  9. if ( $handle = @fopen( $htaccess_file, 'w' ) ) { 
  10. fwrite( $handle, "Deny from all\n" ); 
  11. fclose( $handle );