WordPress does not allow uploading files with non standard extensions. To be able to upload files without getting warning from WordPress, you need to apply upload_mimes filter and add it to your functions.php file of your theme. In the example below, we add files with .wpas extension to the allowed file list:
This file contains 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('upload_mimes', 'my_upload_types'); | |
function my_upload_types($existing_mimes=array()){ | |
$existing_mimes['wpas'] = 'wpas'; | |
return $existing_mimes; | |
} |