mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-29 01:34:27 +00:00
Add unfiltered_upload cap, and allow for admins. Props Nazgul. fixes #4136
git-svn-id: https://develop.svn.wordpress.org/trunk@5303 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1948,7 +1948,7 @@ function wp_handle_upload( &$file, $overrides = false ) {
|
||||
return $upload_error_handler( $file, __( 'Specified file failed upload test.' ));
|
||||
|
||||
// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
|
||||
if ( $test_type ) {
|
||||
if ( $test_type && !current_user_can( 'unfiltered_upload' ) ) {
|
||||
$wp_filetype = wp_check_filetype( $file['name'], $mimes );
|
||||
|
||||
extract( $wp_filetype );
|
||||
|
||||
Reference in New Issue
Block a user