Can I change the file and image types that are allowed?
Yes, you must use the following filters.
If you want to change the file types allowed, use this filter «bxcft_files_ext_allowed». In the following code, the file extensions that are allowed are «txt» and «pdf»:
1 2 3 4 5 |
add_filter('bxcft_files_ext_allowed', 'my_files_ext_allowed'); function my_files_ext_allowed($array_files_ext_allowed) { return array('txt', 'pdf'); } |
By default, only «doc», «docx» and «pdf» are allowed.
If you want to change the image types allowed, use this filter «bxcft_images_ext_allowed». In the following code, the image extensions that are allowed are «png» and «gif»:
1 2 3 4 5 |
add_filter('bxcft_images_ext_allowed', 'my_images_ext_allowed'); function my_images_ext_allowed($array_images_ext_allowed) { return array('png', 'gif'); } |
By default, only «jpg», «jpeg», «gif» and «png» are allowed.