Plugin Directory

Changeset 2606195


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

fix template_redirect action hook

Location:
wp-lozad/trunk
Files:
3 edited

Legend:

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

    r2602929 r2606195  
    4040            } elseif (
    4141                $cache_enabled
     42                && has_filter('wp_cache_ob_callback_filter')
    4243                && function_exists('wp_cache_user_agent_is_rejected') && !wp_cache_user_agent_is_rejected()
    4344                && function_exists('wpsc_is_backend') && !wpsc_is_backend()
     
    4546                add_filter('wp_cache_ob_callback_filter', [$this, 'lozadContentProcessing'], $hookLevel);
    4647            } else {
    47                 add_action('template_redirect', [$this, 'lozadContentProcessing'], $hookLevel);
     48                add_action('template_redirect', function () {
     49                    ob_start(function ($buffer) {
     50                        return $this->lozadContentProcessing($buffer);
     51                    });
     52                }, $hookLevel);
    4853            }
    4954            return true;
  • wp-lozad/trunk/lozad.php

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

    r2602929 r2606195  
    44Requires at least: 5.0
    55Tested up to: 5.8
    6 Stable tag: 1.5.0
     6Stable tag: 1.5.1
    77License: GPL2
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2424
    2525== Changelog ==
     26= 1.5.1 =
     27* 2021-09-28: fix template_redirect action hook
     28
     29= 1.5.0 =
     30* 2021-09-22: add hook level option
     31
    2632= 1.4.9 =
    2733* 2021-08-09: get_home_path func replace by ABSPATH const
Note: See TracChangeset for help on using the changeset viewer.