Skip to content

Commit

Permalink
bugfix mime_content_type, version 0.10.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Volkmar Kantor committed Sep 12, 2017
1 parent 29e902e commit 453ed17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crop-thumbnails.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
* Author: Volkmar Kantor
* Author URI: http://www.totalmedial.de
* Version: 0.10.14
* Version: 0.10.15
* Description: Crop your thumbnails, the easy way.
* Text Domain: crop-thumbnails
*
Expand All @@ -27,7 +27,7 @@

//cpt - stands for crop-post-thumbnail
define('CROP_THUMBS_LANG','cpt_lang');
define('CROP_THUMBS_VERSION','0.10.14');
define('CROP_THUMBS_VERSION','0.10.15');

function cpt_plugin_init() {
load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
Expand Down
3 changes: 2 additions & 1 deletion functions/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ function saveThumbnail() {

if(!$_error) {
//update metadata --> otherwise new sizes will not be updated
$filetype = wp_check_filetype( $_filepath );
$_new_meta = array(
'file'=>$_filepath_info['basename'],
'width'=>intval($crop_width),
'height'=>intval($crop_height),
'mime-type' => mime_content_type($_filepath)
'mime-type' => $filetype['type']
);
if(!empty($dbImageSizes[$_imageSize->name]['crop'])) {
$_new_meta['crop'] = $dbImageSizes[$_imageSize->name]['crop'];
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=volkm
Tags: post-thumbnails, images, media library
Requires at least: 4.6
Tested up to: 4.7
Stable tag: 0.10.14
Stable tag: 0.10.15
License: GPL v3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -121,6 +121,9 @@ If you fork and planning to publish the forked plugin, please contact me.
6. Quicktest on settings-page, to check if your system is correct setup.

== Changelog ==
= 0.10.15 =
* bugfix: use wordpress-function to determine mime-type, as some servers do not define "mime_content_type" (Thank you Eskil Keskikangas for the submission)

= 0.10.14 =
* bugfix: add mime-type to image-metadata (the mime-type was deleted by crop-thumbnails before unintentional)

Expand Down

0 comments on commit 453ed17

Please sign in to comment.