Subject: [wp-svn] [39891] trunk/src/wp-includes: Media: Use
a consistent error message for file type errors on
uploading.



Revision 39891 Author SergeyBiryukov Date 2017-01-12 06:28:32 +0000 (Thu, 12 Jan 2017)
Media: Use a consistent error message for file type errors on uploading.

Props pavelevap, jackreichert.
Fixes #33242.
Modified Paths Diff Modified: trunk/src/wp-includes/functions.php
--- trunk/src/wp-includes/functions.php	2017-01-12 06:15:23 UTC (rev 39890)
+++ trunk/src/wp-includes/functions.php	2017-01-12 06:28:32 UTC (rev 39891)
@@ -2139,7 +2139,7 @@
 
 	$wp_filetype = wp_check_filetype( $name );
 	if ( ! $wp_filetype['ext'] && ! current_user_can( 'unfiltered_upload' ) )
-		return array( 'error' => __( 'Invalid file type' ) );
+		return array( 'error' => __( 'Sorry, this file type is not permitted for security reasons.' ) );
 
 	$upload = wp_upload_dir( $time );
 
Modified: trunk/src/wp-includes/script-loader.php
--- trunk/src/wp-includes/script-loader.php	2017-01-12 06:15:23 UTC (rev 39890)
+++ trunk/src/wp-includes/script-loader.php	2017-01-12 06:28:32 UTC (rev 39891)
@@ -280,7 +280,7 @@
 		'queue_limit_exceeded' => __('You have attempted to queue too many files.'),
 		'file_exceeds_size_limit' => __('%s exceeds the maximum upload size for this site.'),
 		'zero_byte_file' => __('This file is empty. Please try another.'),
-		'invalid_filetype' => __('This file type is not allowed. Please try another.'),
+		'invalid_filetype' => __('Sorry, this file type is not permitted for security reasons.'),
 		'not_an_image' => __('This file is not an image. Please try another.'),
 		'image_memory_exceeded' => __('Memory exceeded. Please try another smaller file.'),
 		'image_dimensions_exceeded' => __('This is larger than the maximum size. Please try another.'),
_______________________________________________
wp-svn mailing list
wp-svn@xxxxxxxxxxxxxxxxxxx
http://lists.wordpress.org/mailman/listinfo/wp-svn



Programming list archiving by: Enterprise Git Hosting