Created
August 16, 2021 05:31
-
-
Save rafiahmedd/e0d7bd5746a2cfd23611ffe5eff6259f to your computer and use it in GitHub Desktop.
Add PSD, AI, EPS file for upload in ff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform_file_type_options', function ($types) { | |
$types []= [ | |
'label' => __('PSD, AI & EPS Files', 'fluentform'), | |
'value' => 'psd|ai|eps', | |
]; | |
return $types; | |
}); | |
add_action('fluentform_starting_file_upload', function () { | |
add_filter('fluentform_uploader_args', function ($args) { | |
$args['test_type'] = false; | |
return $args; | |
}); | |
add_filter('upload_mimes', function ($mime_types) { | |
$mime_types['psd'] = 'image/vnd.adobe.photoshop'; | |
$mime_types['ai'] = 'application/postscript'; | |
$mime_types['eps'] = 'application/postscript'; | |
return $mime_types; | |
}, 1, 1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment