feat: cancel retrieving file types from file names (#387)

pull/399/head
Seaton Jiang 2021-06-26 10:29:28 +08:00
parent caf69a6413
commit d21e729e6d
No known key found for this signature in database
GPG Key ID: 0E05070D261ACFEA
1 changed files with 3 additions and 3 deletions

View File

@ -81,10 +81,10 @@ add_filter( 'of_sanitize_checkbox', 'of_sanitize_checkbox' );
*/ */
function of_sanitize_upload( $input ) { function of_sanitize_upload( $input ) {
$output = ''; $output = '';
$filetype = wp_check_filetype( $input ); // $filetype = wp_check_filetype( $input );
if ( $filetype["ext"] ) { // if ( $filetype["ext"] ) {
$output = esc_url( $input ); $output = esc_url( $input );
} // }
return $output; return $output;
} }
add_filter( 'of_sanitize_upload', 'of_sanitize_upload' ); add_filter( 'of_sanitize_upload', 'of_sanitize_upload' );