Ticket #2027: nothumb.diff
| File nothumb.diff, 1.5 KB (added by skeltoac, 6 years ago) |
|---|
-
wp-admin/inline-uploading.php
5 5 if (!current_user_can('edit_posts')) 6 6 die(__('You do not have permission to edit posts.')); 7 7 8 $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment' );8 $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment', 'thumbnail'); 9 9 10 10 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 11 11 $wpvar = $wpvarstoreset[$i]; … … 83 83 84 84 add_post_meta($id, '_wp_attachment_metadata', $imagedata); 85 85 86 if ( $ imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024) {86 if ( $thumbnail && ($imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024) ) { 87 87 if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) 88 88 $error = wp_create_thumbnail($file, 128); 89 89 elseif ( $imagedata['height'] > 96 ) … … 548 548 <input type="hidden" name="action" value="save" /> 549 549 <input type="hidden" name="post" value="<?php echo $post; ?>" /> 550 550 <input type="hidden" name="all" value="<?php echo $all; ?>" /> 551 <label for="thumbnail"><?php _e('Create Thumbnail'); ?><input type="checkbox" name="thumbnail" id="thumbnail" value="1" /></label> 551 552 <input type="submit" value="<?php _e('Upload'); ?>" /> 552 553 <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 553 554 </td>
