Changeset 37727
- Timestamp:
- 06/16/2016 03:38:12 PM (8 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/plupload/handlers.js
r37722 r37727 286 286 break; 287 287 case plupload.FILE_EXTENSION_ERROR: 288 wpFileE rror(fileObj, pluploadL10n.invalid_filetype);288 wpFileExtensionError( uploader, file, pluploadL10n.invalid_filetype ); 289 289 break; 290 290 case plupload.FILE_SIZE_ERROR: … … 337 337 message = pluploadL10n.file_exceeds_size_limit.replace('%s', file.name); 338 338 339 jQuery('#media-items').append('<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>'); 340 up.removeFile(file); 341 } 342 343 function wpFileExtensionError( up, file, message ) { 339 344 jQuery('#media-items').append('<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>'); 340 345 up.removeFile(file); -
trunk/src/wp-includes/media.php
r37560 r37727 2919 2919 2920 2920 /** 2921 * Prints default plupload arguments.2921 * Prints default Plupload arguments. 2922 2922 * 2923 2923 * @since 3.4.0 … … 2931 2931 2932 2932 $max_upload_size = wp_max_upload_size(); 2933 $allowed_extensions = array_keys( get_allowed_mime_types() ); 2934 $extensions = array(); 2935 foreach ( $allowed_extensions as $extension ) { 2936 $extensions = array_merge( $extensions, explode( '|', $extension ) ); 2937 } 2933 2938 2934 2939 $defaults = array( … … 2940 2945 'filters' => array( 2941 2946 'max_file_size' => $max_upload_size . 'b', 2947 'mime_types' => array( array( 'extensions' => implode( ',', $extensions ) ) ), 2942 2948 ), 2943 2949 );
Note: See TracChangeset
for help on using the changeset viewer.