feat: allow Python file uploads
Extended the MIME types to permit Python (.py) file uploads. This enhances flexibility for users needing to upload scripts via the media library. No other functionalities were altered.
This commit is contained in:
parent
9885d43548
commit
2b03226a50
1 changed files with 6 additions and 0 deletions
|
@ -827,3 +827,9 @@ function handle_pdf_download()
|
|||
}
|
||||
}
|
||||
add_action('template_redirect', 'handle_pdf_download');
|
||||
|
||||
function allow_more_uploads($mime_types) {
|
||||
$mime_types['py'] = 'text/x-python';
|
||||
return $mime_types;
|
||||
}
|
||||
add_filter('upload_mimes', 'allow_more_uploads');
|
Loading…
Reference in a new issue