Plugin Directory

Changeset 2183707


Ignore:
Timestamp:
10/31/2019 09:10:03 AM (6 years ago)
Author:
cloudimageio
Message:

Release of 2.1.4 - bug fixes for unused variables, planned for version 3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cloudimage/trunk/public/class-cloudimage-public.php

    r2183683 r2183707  
    134134        $this->cloudimage_use_lazy_loading = $this->cloudimage_options['cloudimage_use_lazy_loading'];
    135135
    136        /* TODO: Future improvements with adjustment of skip classes and default low quality option
    137         * $this->cloudimage_skip_classes = $this->cloudimage_options['cloudimage_skip_classes'];
    138         * $this->cloudimage_add_default_low_quality = $this->cloudimage_options['cloudimage_add_default_low_quality'];
    139         * $this->cloudimage_placeholder_url = $this->cloudimage_options['cloudimage_placeholder_url'];
    140         */
     136        /* TODO: Future improvements with adjustment of skip classes and default low quality option
     137         * $this->cloudimage_skip_classes = $this->cloudimage_options['cloudimage_skip_classes'];
     138         * $this->cloudimage_add_default_low_quality = $this->cloudimage_options['cloudimage_add_default_low_quality'];
     139         * $this->cloudimage_placeholder_url = $this->cloudimage_options['cloudimage_placeholder_url'];
     140         */
    141141
    142142        $this->cloudimage_use_blurhash = $this->cloudimage_options['cloudimage_use_blurhash'];
     
    323323                            }
    324324                        }
    325                         $image_blurhash =  isset($image_blurhash) ? 'ci-blur-hash="' . esc_attr($image_blurhash) . '" ' : '';
     325                        $image_blurhash = isset($image_blurhash) ? 'ci-blur-hash="' . esc_attr($image_blurhash) . '" ' : '';
    326326                    }
    327327
     
    460460
    461461            //Only update fields if we have blurhash, different from zero
    462             if ($blurhash !== 0)
    463             {
     462            if ($blurhash !== 0) {
    464463                //Add in array of meta data new field - blurhash
    465464                $meta['image_meta']['blurhash'] = $blurhash;
     
    674673    {
    675674        //Check if we have not set width and height
    676         if (!isset($meta['width']) && !isset($meta['height']))
    677         {
     675        if (!isset($meta['width']) && !isset($meta['height'])) {
    678676            return [
    679677                'w' => 0,
     
    684682        // use min not to resize the images to bigger size than original one
    685683        $size_array['width'] = min($size_array['width'], $meta['width']);
    686         $size_array['height'] = min($size_array['height'], $meta['height']);
     684        $size_array['height'] = isset($size_array['height']) ? min($size_array['height'], $meta['height']) : 0;
    687685
    688686        return [
Note: See TracChangeset for help on using the changeset viewer.