Dynamic width/height image sizes
-
Hi,
the theme i use for my site uses 9999 for images that have a dynamic height and this plugin expects 0 for a dynamic height. So I made some small changes in the php code that it also supports 9999 (for width and height).
save.php:
Changed line 84 to:if(!$_imageSize->crop || $_imageSize->width==0 || $_imageSize->height==0 || $_imageSize->width==9999 || $_imageSize->height==9999) {
editor.php:
Added the next lines below the foreach on line 226:if ($value['height'] == 9999) { $value['height'] = 0; } if ($value['width'] == 9999) { $value['width'] = 0; }
I saw in the function reference of add_image_size that 9999 is also used as an example for unlimited height. So it would be nice if the next version of this plugin also supports it 🙂
Regards,
Sandy
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Dynamic width/height image sizes’ is closed to new replies.