Plugin Directory

Changeset 2111955


Ignore:
Timestamp:
06/25/2019 08:24:28 AM (6 years ago)
Author:
processby
Message:

Lazy Load Optimizer update

Location:
lazy-load-optimizer/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • lazy-load-optimizer/trunk/lazy-load-optimizer.php

    r2102305 r2111955  
    88 * Plugin URI:        https://processby.com/lazy-load-wordpress/
    99 * Description:       Lazy loading images to speed up sites page load speed.
    10  * Version:           1.4.2
     10 * Version:           1.4.3
    1111 * Author:            Processby
    1212 * Author URI:        https://processby.com/
  • lazy-load-optimizer/trunk/readme.txt

    r2102305 r2111955  
    55Requires at least: 4.9.8
    66Tested up to: 5.2.1
    7 Stable tag: 1.4.2
     7Stable tag: 1.4.3
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    6161== Changelog ==
    6262
     63= 1.4.3 =
     64
     65Release Date: Jun 25, 2019
     66
     67* Improved Lazy Load styles
     68
    6369= 1.4.2 =
    6470
  • lazy-load-optimizer/trunk/src/Admin/Customizer.php

    r2102305 r2111955  
    110110        $checkboxOptions = array(
    111111            'label' => __('Transparent background', 'lazy-load-optimizer'),
    112             'default' => 0,
     112            'default' => 1,
    113113        );
    114114        $this->addSetting('transparent_background', 'checkbox', $wp_customize, $checkboxOptions);
     
    139139        switch ($type) {
    140140            case 'text':
     141            case 'textarea':
    141142            case 'checkbox':
    142143                $wp_customize->add_setting($name, array(
  • lazy-load-optimizer/trunk/src/Frontend/Frontend.php

    r2102305 r2111955  
    219219            'time_animation' => get_theme_mod('time_animation',300),
    220220            'time_fadein' => get_theme_mod('time_fadein',300),
    221             'is_transparent' => get_theme_mod('transparent_background',0),
     221            'is_transparent' => get_theme_mod('transparent_background',1),
    222222            'background_color' => get_theme_mod('lla_background_color', '#ffffff')
    223223        );
     
    358358        if(!empty($image[1]) && !empty($image[2])){
    359359            $ratio = $image[1]/$image[2];
     360            $attr['width'] = $image[1];
    360361        }else{
    361362            $ratio = 2;
    362363        }
     364
    363365        $attr['style'] = '--aspect-ratio:'.$ratio.';';
    364366        if (isset($attr['src'])){
     
    389391        if ($thumbnail_id) {
    390392            $image = wp_get_attachment_image_src($thumbnail_id, $small_thumbnail_size);
    391             if(!empty($image[1]) && !empty($image[2])){
    392                 $ratio = $image[1]/$image[2];
     393
     394            if(!empty($dimensions['width']) && !empty($dimensions['height'])){
     395                $ratio = $dimensions['width']/$dimensions['height'];
    393396            }else{
    394397                $ratio = 2;
  • lazy-load-optimizer/trunk/src/LazyLoadOptimizerPlugin.php

    r2102305 r2111955  
    1515{
    1616
    17     const VERSION = '1.4.2';
     17    const VERSION = '1.4.3';
    1818
    1919    const DOMAIN = 'lazy-load-optimizer';
Note: See TracChangeset for help on using the changeset viewer.