Changeset 534142
- Timestamp:
- 04/20/2012 04:29:06 PM (14 years ago)
- Location:
- post-thumbnail-editor
- Files:
-
- 6 added
- 6 edited
- 1 copied
-
assets (added)
-
assets/banner-772x250.jpg (added)
-
tags/1.0.5 (copied) (copied from post-thumbnail-editor/trunk)
-
tags/1.0.5/README.txt (modified) (3 diffs)
-
tags/1.0.5/i18n/post-thumbnail-editor-de_DE.mo (added)
-
tags/1.0.5/i18n/post-thumbnail-editor-de_DE.po (added)
-
tags/1.0.5/php/functions.php (modified) (1 diff)
-
tags/1.0.5/post-thumbnail-editor.php (modified) (4 diffs)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/i18n/post-thumbnail-editor-de_DE.mo (added)
-
trunk/i18n/post-thumbnail-editor-de_DE.po (added)
-
trunk/php/functions.php (modified) (1 diff)
-
trunk/post-thumbnail-editor.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-thumbnail-editor/tags/1.0.5/README.txt
r452243 r534142 4 4 Tags: post-thumbnail, post thumbnail, featured image, featured, editor, image, awesome 5 5 Requires at least: 3.2 6 Tested up to: 3. 2.16 Tested up to: 3.3.1 7 7 Stable tag: trunk 8 8 … … 64 64 == Changelog == 65 65 66 = 1.0.5 = 67 * Fix custom sizes with either height or width set to '0' 68 * Added German translation 69 66 70 = 1.0.4 = 67 71 * Added full paths to php includes … … 99 103 == Upgrade Notice == 100 104 105 = 1.0.5 = 106 Bugfix & added German translation 107 101 108 = 1.0.4 = 102 109 Bugfixes & portuguese translation -
post-thumbnail-editor/tags/1.0.5/php/functions.php
r452241 r534142 324 324 */ 325 325 function pte_get_width_height( $size_information, $w, $h ){ 326 $logger = PteLogger::singleton(); 326 327 if ( $size_information['crop'] == 1 ){ 328 $logger->debug("GETwidthheightCROPPED"); 327 329 $dst_w = $size_information['width']; 328 330 $dst_h = $size_information['height']; 329 331 } 330 332 // Crop isn't set so the height / width should be based on the biggest side 331 else if ($w > $h){ 332 $dst_w = $size_information['width']; 333 $dst_h = round( ($dst_w/$w) * $h, 0); 334 } 333 // or check if the post_thumbnail has a 0 for a side. 335 334 else { 336 $dst_h = $size_information['height']; 337 $dst_w = round( ($dst_h/$h) * $w, 0); 338 } 339 $return = compact( "dst_w", "dst_h" ); 340 return $return; 335 $use_width = false; 336 if ( $w > $h ) $use_width = true; 337 if ( $size_information['height'] == 0 ) $use_width = true; 338 if ( $size_information['width'] == 0 ) $use_width = false; 339 340 $logger->debug("GETwidthheightPARAMS\nWIDTH: $w\nHEIGHT: $h\nUSE_WIDTH: $use_width"); 341 if ( $use_width ){ 342 $dst_w = $size_information['width']; 343 $dst_h = round( ($dst_w/$w) * $h, 0); 344 } 345 else { 346 $dst_h = $size_information['height']; 347 $dst_w = round( ($dst_h/$h) * $w, 0); 348 } 349 } 350 351 // Sanity Check 352 if ( $dst_h == 0 || $dst_w == 0 ){ 353 $logger->error( "Invalid derived dimensions: ${dst_w} x ${dst_h}" ); 354 } 355 return compact( "dst_w", "dst_h" ); 341 356 } 342 357 -
post-thumbnail-editor/tags/1.0.5/post-thumbnail-editor.php
r452241 r534142 4 4 Author: sewpafly 5 5 Author URI: http://sewpafly.github.com/post-thumbnail-editor 6 Version: 1.0. 46 Version: 1.0.5 7 7 Description: Individually manage your post thumbnails 8 8 … … 10 10 ======= 11 11 12 Copyright 201 1(email : sewpafly@gmail.com)12 Copyright 2012 (email : sewpafly@gmail.com) 13 13 14 14 This program is free software; you can redistribute it and/or modify … … 36 36 define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/"); 37 37 define( 'PTE_DOMAIN', "post-thumbnail-editor"); 38 define( 'PTE_VERSION', "1.0. 4");38 define( 'PTE_VERSION', "1.0.5"); 39 39 40 40 /* … … 218 218 , false 219 219 , basename( PTE_PLUGINPATH ) . DIRECTORY_SEPARATOR . "i18n" ); 220 220 221 ?> -
post-thumbnail-editor/trunk/README.txt
r452243 r534142 4 4 Tags: post-thumbnail, post thumbnail, featured image, featured, editor, image, awesome 5 5 Requires at least: 3.2 6 Tested up to: 3. 2.16 Tested up to: 3.3.1 7 7 Stable tag: trunk 8 8 … … 64 64 == Changelog == 65 65 66 = 1.0.5 = 67 * Fix custom sizes with either height or width set to '0' 68 * Added German translation 69 66 70 = 1.0.4 = 67 71 * Added full paths to php includes … … 99 103 == Upgrade Notice == 100 104 105 = 1.0.5 = 106 Bugfix & added German translation 107 101 108 = 1.0.4 = 102 109 Bugfixes & portuguese translation -
post-thumbnail-editor/trunk/php/functions.php
r452241 r534142 324 324 */ 325 325 function pte_get_width_height( $size_information, $w, $h ){ 326 $logger = PteLogger::singleton(); 326 327 if ( $size_information['crop'] == 1 ){ 328 $logger->debug("GETwidthheightCROPPED"); 327 329 $dst_w = $size_information['width']; 328 330 $dst_h = $size_information['height']; 329 331 } 330 332 // Crop isn't set so the height / width should be based on the biggest side 331 else if ($w > $h){ 332 $dst_w = $size_information['width']; 333 $dst_h = round( ($dst_w/$w) * $h, 0); 334 } 333 // or check if the post_thumbnail has a 0 for a side. 335 334 else { 336 $dst_h = $size_information['height']; 337 $dst_w = round( ($dst_h/$h) * $w, 0); 338 } 339 $return = compact( "dst_w", "dst_h" ); 340 return $return; 335 $use_width = false; 336 if ( $w > $h ) $use_width = true; 337 if ( $size_information['height'] == 0 ) $use_width = true; 338 if ( $size_information['width'] == 0 ) $use_width = false; 339 340 $logger->debug("GETwidthheightPARAMS\nWIDTH: $w\nHEIGHT: $h\nUSE_WIDTH: $use_width"); 341 if ( $use_width ){ 342 $dst_w = $size_information['width']; 343 $dst_h = round( ($dst_w/$w) * $h, 0); 344 } 345 else { 346 $dst_h = $size_information['height']; 347 $dst_w = round( ($dst_h/$h) * $w, 0); 348 } 349 } 350 351 // Sanity Check 352 if ( $dst_h == 0 || $dst_w == 0 ){ 353 $logger->error( "Invalid derived dimensions: ${dst_w} x ${dst_h}" ); 354 } 355 return compact( "dst_w", "dst_h" ); 341 356 } 342 357 -
post-thumbnail-editor/trunk/post-thumbnail-editor.php
r452241 r534142 4 4 Author: sewpafly 5 5 Author URI: http://sewpafly.github.com/post-thumbnail-editor 6 Version: 1.0. 46 Version: 1.0.5 7 7 Description: Individually manage your post thumbnails 8 8 … … 10 10 ======= 11 11 12 Copyright 201 1(email : sewpafly@gmail.com)12 Copyright 2012 (email : sewpafly@gmail.com) 13 13 14 14 This program is free software; you can redistribute it and/or modify … … 36 36 define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/"); 37 37 define( 'PTE_DOMAIN', "post-thumbnail-editor"); 38 define( 'PTE_VERSION', "1.0. 4");38 define( 'PTE_VERSION', "1.0.5"); 39 39 40 40 /* … … 218 218 , false 219 219 , basename( PTE_PLUGINPATH ) . DIRECTORY_SEPARATOR . "i18n" ); 220 220 221 ?>
Note: See TracChangeset
for help on using the changeset viewer.