wpcf7_file_form_enctype_filter()
A wpcf7_form_enctype filter callback that sets the enctype attribute to multipart/form-data if the form has file-uploading fields.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpcf7_file_form_enctype_filter( $enctype );
- $enctype(обязательный)
- .
Код wpcf7_file_form_enctype_filter() wpcf7 file form enctype filter CF7 6.1.6
function wpcf7_file_form_enctype_filter( $enctype ) {
$multipart = (bool) wpcf7_scan_form_tags( array(
'feature' => 'file-uploading',
) );
if ( $multipart ) {
$enctype = 'multipart/form-data';
}
return $enctype;
}