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
if ( !function_exists( 'wpcf7_file_form_enctype_filter' ) ) { require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/file.php'; } // The enctype. $enctype = null; // NOTICE! Understand what this does before running. $result = wpcf7_file_form_enctype_filter($enctype);
Defined (1)
The function is defined in the following location(s).
- /modules/file.php
- function wpcf7_file_form_enctype_filter( $enctype ) {
- $multipart = (bool) wpcf7_scan_form_tags( array( 'type' => array( 'file', 'file*' ) ) );
- if ( $multipart ) {
- $enctype = 'multipart/form-data';
- }
- return $enctype;
- }