WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types

The file types that you have specified ‘application/msword’, ‘application/vnd.ms-excel’, ‘application/pdf’ are already supported by media uploader.

To see the default supported mime file types, call wp_get_mime_types() function.

Use upload_mimes filter as shown in following code to make media uploader to accept files types other than the default.

Add following code in your themes functions.php file

// Add the filter
add_filter('upload_mimes', 'custom_upload_mimes');

function custom_upload_mimes ( $existing_mimes=array() ) {

// Add file extension 'extension' with mime type 'mime/type'
$existing_mimes['prc'] = 'application/x-mobipocket'; 

// and return the new full result
return $existing_mimes; 
}