Plugin Directory

Changeset 2642104


Ignore:
Timestamp:
12/09/2021 09:31:38 PM (4 years ago)
Author:
john1302
Message:

support php5

Location:
wp-lozad/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wp-lozad/trunk/classes/ContentProcessing.php

    r2580247 r2642104  
    9696                        continue;
    9797                    }
    98                     if (strripos($replaceHTML, " {$imageBaseAttr}=") === false) {
     98                    if (strripos($replaceHTML, " $imageBaseAttr=") === false) {
    9999                        $replacement = sprintf('<img %s="%s"', $imageBaseAttr, $imageBaseAttrValue);
    100100                        $replaceHTML = preg_replace('/<img/is', $replacement, $replaceHTML);
     
    267267            $classes = explode(',', $this->pluginOptions[SettingsConstants::SETTING_SKIPPED_CLASSES_STRING]);
    268268            foreach ($classes as $class) {
    269                 array_push($skippedClasses, trim($class));
     269                $skippedClasses[] = trim($class);
    270270            }
    271271        }
     
    292292    private function pushArrays($search, $replace)
    293293    {
    294         array_push($this->search, $search);
    295         array_push($this->replace, $replace);
     294        $this->search[] = $search;
     295        $this->replace[] = $replace;
    296296    }
    297297}
  • wp-lozad/trunk/classes/FrontPageProcessing.php

    r2606195 r2642104  
    6363    private function getPluginOptionsValue($option)
    6464    {
    65         return get_option(SettingsConstants::PAGE_SETTING_OPTION_NAME)[$option] ?? null;
     65        $val = get_option(SettingsConstants::PAGE_SETTING_OPTION_NAME);
     66        return isset($val[$option]) ? $val[$option] : null;
    6667    }
    6768}
  • wp-lozad/trunk/classes/settings/AdminSettingsPage.php

    r2602929 r2642104  
    9191        $optionName = $args['name'];
    9292        $value = get_option(SettingsConstants::PAGE_SETTING_OPTION_NAME);
    93         $value = $value[$optionName] ?? null;
     93        $value = isset($value[$optionName]) ? $value[$optionName] : null;
    9494        $optionConfig = $args['optionConf'];
    9595        $formOptionName = SettingsConstants::PAGE_SETTING_OPTION_NAME . '[' . $optionName . ']';
  • wp-lozad/trunk/lozad.php

    r2606195 r2642104  
    44Description: lazy loading of images by baroda algorithm
    55Author: Evgeniy Kozenok
    6 Version: 1.5.1
     6Version: 1.5.2
    77*/
    88
  • wp-lozad/trunk/readme.txt

    r2606195 r2642104  
    44Requires at least: 5.0
    55Tested up to: 5.8
    6 Stable tag: 1.5.1
     6Stable tag: 1.5.2
    77License: GPL2
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2424
    2525== Changelog ==
     26= 1.5.2 =
     27* 2021-12-09: fix php 5 support
     28
    2629= 1.5.1 =
    2730* 2021-09-28: fix template_redirect action hook
Note: See TracChangeset for help on using the changeset viewer.