Improve the wording of the file upload security message. props janeforshort. fixes #13550
git-svn-id: https://develop.svn.wordpress.org/trunk@16577 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0c15540407
commit
012da48a0a
|
@ -338,7 +338,7 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
|
||||||
$file['name'] = $proper_filename;
|
$file['name'] = $proper_filename;
|
||||||
|
|
||||||
if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
|
if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
|
||||||
return call_user_func($upload_error_handler, $file, __( 'File type does not meet security guidelines. Try another.' ));
|
return call_user_func($upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' ));
|
||||||
|
|
||||||
if ( !$ext )
|
if ( !$ext )
|
||||||
$ext = ltrim(strrchr($file['name'], '.'), '.');
|
$ext = ltrim(strrchr($file['name'], '.'), '.');
|
||||||
|
@ -458,7 +458,7 @@ function wp_handle_sideload( &$file, $overrides = false ) {
|
||||||
$file['name'] = $proper_filename;
|
$file['name'] = $proper_filename;
|
||||||
|
|
||||||
if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
|
if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) )
|
||||||
return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' ));
|
return $upload_error_handler( $file, __( 'Sorry, this file type is not permitted for security reasons.' ));
|
||||||
|
|
||||||
if ( !$ext )
|
if ( !$ext )
|
||||||
$ext = ltrim(strrchr($file['name'], '.'), '.');
|
$ext = ltrim(strrchr($file['name'], '.'), '.');
|
||||||
|
|
Loading…
Reference in New Issue