Bu yazımda sizlere wordpress siteye .torrent ve bunun gibi yüklenemeyen dosyaları yüklemeyi göstereceğim. Bu kod parçacığını temanızın function.php dosyasına eklememiz gerekiyor.
<?php
add_filter('upload_mimes','add_custom_mime_types');
function add_custom_mime_types($mimes){
return array_merge($mimes,array (
'torrent' => 'application/x-bittorrent',
));
}
?>
<?php
add_filter('upload_mimes','add_custom_mime_types');
function add_custom_mime_types($mimes){
return array_merge($mimes,array (
'torrent' => 'application/x-bittorrent',
));
}
?>