Changeset 2774846
- Timestamp:
- 08/24/2022 11:35:12 AM (4 years ago)
- Location:
- greenweb/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
apart.php (modified) (2 diffs)
-
greenweb_globals.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
greenweb/trunk/README.txt
r2743511 r2774846 79 79 == Changelog == 80 80 81 = 1.1.2 = 82 * Bugfix: Css backgrounds images removed from altering url 83 81 84 = 1.1.1 = 82 85 * Bugfix: If there is no prefix or wrong/failing prefix the plugin will not alter the src of image. -
greenweb/trunk/apart.php
r2743511 r2774846 13 13 * Plugin URI: seenthis.co 14 14 * Description: APART reduces your site’s carbon footprint and improves user experience by reducing its image data transfer and improving image load times. 15 * Version: 1.1. 115 * Version: 1.1.2 16 16 * Author: Seenthis 17 17 * Author URI: https://www.seenthis.co … … 183 183 global $optiUrl; 184 184 $images = $document->getElementsByTagName('img'); 185 185 186 186 foreach ($images as $img) { 187 187 $srcset = $img->getAttribute('srcset'); 188 188 $src = $img->getAttribute('src'); 189 $img->setAttribute('src', $optiUrl . $src); 190 if ($srcset) { 191 global $replace; 192 $img->setAttribute('srcset', strtr($srcset, $replace)); 189 $style = $img->getAttribute('style'); 190 191 if(!strpos($style, 'background-image:')) { 192 $img->setAttribute('src', $optiUrl . $src); 193 194 if ($srcset) { 195 global $replace; 196 $img->setAttribute('srcset', strtr($srcset, $replace)); 197 }; 193 198 } 194 199 } -
greenweb/trunk/greenweb_globals.php
r2743511 r2774846 9 9 const baseName = 'apart'; 10 10 const rootFolder = 'greenweb'; 11 const version = '1.1. 1';11 const version = '1.1.2'; 12 12 13 13 class greenweb_settings{
Note: See TracChangeset
for help on using the changeset viewer.