Changeset 3439324
- Timestamp:
- 01/14/2026 09:24:09 AM (2 weeks ago)
- Location:
- images-to-webp/trunk
- Files:
-
- 3 edited
-
images-to-webp.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
tabs/tab-general.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
images-to-webp/trunk/images-to-webp.php
r3438710 r3439324 4 4 Plugin URI: https://www.paypal.me/jakubnovaksl 5 5 Description: Convert JPG, PNG and GIF images to WEBP, speed up your web 6 Version: 4.9 6 Version: 4.9.1 7 7 Author: KubiQ 8 8 Author URI: https://kubiq.sk … … 326 326 $files = scandir( $folder ); 327 327 $converted = 0; 328 329 $skip_until = false; 330 $webp_processed_file = $folder . '/.webp-processed.json'; 331 if( file_exists( $webp_processed_file ) ){ 332 $skip_until = trim( file_get_contents( $webp_processed_file ) ); 333 } 334 328 335 foreach( $files as $file ){ 329 336 if( ! $only_missing || ! file_exists( $folder . '/' . $file . '.webp' ) ){ 330 $converted += $this->convert_image( $folder . '/' . $file ) ? 1 : 0; 337 if( ! in_array( substr( $file, -5 ), [ '.webp', '.avif' ] ) ){ 338 if( $skip_until ){ 339 if( $skip_until == $folder . '/' . $file ){ 340 $skip_until = false; 341 } 342 }else{ 343 $converted += $this->convert_image( $folder . '/' . $file ) ? 1 : 0; 344 file_put_contents( $webp_processed_file, $folder . '/' . $file, LOCK_EX ); 345 } 346 } 331 347 } 332 348 } 349 350 wp_delete_file( $webp_processed_file ); 351 333 352 printf( __( '%d converted', 'images-to-webp' ), $converted ); 334 353 } -
images-to-webp/trunk/readme.txt
r3438710 r3439324 6 6 Requires PHP: 7.0 7 7 Tested up to: 6.9 8 Stable tag: 4.9 8 Stable tag: 4.9.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 ## Hooks for developers 35 35 36 #### itw_extensions37 Maybe you want to support also less famous JPEG extension like jpe, jfif or jif38 39 `add_filter( 'itw_extensions', 'extra_itw_extensions', 10, 1 );40 function extra_itw_extensions( $extensions ){41 $extensions[] = 'jpe';42 $extensions[] = 'jfif';43 $extensions[] = 'jif';44 return $extensions;45 }`46 47 36 #### itw_sizes 48 37 Maybe you want to disable WebP for thumbnails … … 195 184 == Changelog == 196 185 186 = 4.9.1 = 187 * optimize old images convert process 188 * remove not working itw_extensions filter 189 197 190 = 4.9 = 198 191 * info banner about new free Images to AVIF plugin -
images-to-webp/trunk/tabs/tab-general.php
r2826965 r3439324 110 110 </th> 111 111 <td> 112 <?php $this->extensions = apply_filters( 'itw_extensions', $this->extensions ); ?>113 112 <?php foreach( $this->extensions as $extension ): ?> 114 113 <br>
Note: See TracChangeset
for help on using the changeset viewer.