Changeset 2536446
- Timestamp:
- 05/24/2021 12:17:26 PM (5 years ago)
- Location:
- wp-lozad/trunk
- Files:
-
- 3 edited
-
classes/FrontPageProcessing.php (modified) (1 diff)
-
lozad.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-lozad/trunk/classes/FrontPageProcessing.php
r2535299 r2536446 28 28 }); 29 29 30 ob_start(); 31 add_action('shutdown', function() { 32 $finalBuffer = ''; 33 for ($i = 0, $levels = ob_get_level(); $i < $levels; $i++) { 34 $finalBuffer .= ob_get_clean(); 30 add_action('plugins_loaded', function () { 31 if (is_admin()) { 32 return true; 35 33 } 36 34 37 echo is_admin() ? $finalBuffer : (new ContentProcessing($finalBuffer))->handle(); 38 }, 0); 35 global $cache_enabled; 36 if (has_filter('final_output')) { 37 add_filter('final_output', [$this, 'lozadContentProcessing']); 38 } elseif ( 39 $cache_enabled 40 && function_exists('wp_cache_user_agent_is_rejected') && !wp_cache_user_agent_is_rejected() 41 && function_exists('wpsc_is_backend') && !wpsc_is_backend() 42 ) { 43 add_filter('wp_cache_ob_callback_filter', [$this, 'lozadContentProcessing']); 44 } else { 45 add_action('template_redirect', [$this, 'lozadContentProcessing']); 46 } 47 return true; 48 }) ; 49 } 50 51 public function lozadContentProcessing($content) 52 { 53 return (new ContentProcessing($content))->handle(); 39 54 } 40 55 } -
wp-lozad/trunk/lozad.php
r2535299 r2536446 4 4 Description: lazy loading of images by baroda algorithm 5 5 Author: Evgeniy Kozenok 6 Version: 1.4. 46 Version: 1.4.5 7 7 */ 8 8 -
wp-lozad/trunk/readme.txt
r2535299 r2536446 4 4 Requires at least: 5.0 5 5 Tested up to: 5.5 6 Stable tag: 1.4. 46 Stable tag: 1.4.5 7 7 License: GPL2 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 24 24 25 25 == Changelog == 26 = 1.4.5 = 27 * 2021-05-24: Use different lozadContentProcessing actions on different case 28 26 29 = 1.4.4 = 27 30 * 2021-05-21: Move base plugin action to wp shutdown action
Note: See TracChangeset
for help on using the changeset viewer.