wpcf7_file_form_enctype_filter

The Contact Form 7 wpcf7 file form enctype filter function.

Description

wpcf7_file_form_enctype_filter( $enctype ); 

Parameters (1)

0. $enctype
The enctype.

Usage

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

Defined (1)

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

/modules/file.php  
  1. function wpcf7_file_form_enctype_filter( $enctype ) { 
  2. $multipart = (bool) wpcf7_scan_form_tags( array( 'type' => array( 'file', 'file*' ) ) ); 
  3.  
  4. if ( $multipart ) { 
  5. $enctype = 'multipart/form-data'; 
  6.  
  7. return $enctype;