Return to Snippet

Revision: 57463
at May 27, 2012 22:00 by scienzedellevanghe


Initial Code
<?php
	add_filter('upload_mimes','customprefix_upload_mimes');
	function customprefix_upload_mimes($mimes){
		return array_merge($mimes,array (
			'ac3' => 'audio/ac3',
			'mpa' => 'audio/MPA',
			'flv' => 'video/x-flv'
		));
	}
?>

Initial URL

                                

Initial Description
This code allows the upload of files with extensions usually forbidden in wordpress

Initial Title
Custom mime types in Wordpress

Initial Tags
wordpress

Initial Language
PHP