Skip to content

Commit 2b8826b

Browse files
author
Hai Zheng
committed
v7.9.1-b5: Showed message when nothing to send in image optimization.
1 parent 025311e commit 2b8826b

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

litespeed-cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: LiteSpeed Cache
44
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
55
* Description: High-performance page caching and site optimization from LiteSpeed
6-
* Version: 7.9.1-b4
6+
* Version: 7.9.1-b5
77
* Author: LiteSpeed Technologies
88
* Author URI: https://www.litespeedtech.com
99
* License: GPLv3
@@ -35,7 +35,7 @@
3535
return;
3636
}
3737

38-
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '7.9.1-b4' );
38+
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '7.9.1-b5' );
3939

4040
! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR );
4141
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU

src/img-optm-send.trait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ public function wet_limit() {
119119
public function new_req() {
120120
global $wpdb;
121121

122+
if ( ! $this->_format && ! $this->conf( self::O_IMG_OPTM_ORI ) ) {
123+
Admin_Display::error( __( 'Please enable Optimize Original Images or WebP/AVIF before sending an optimization request.', 'litespeed-cache' ) );
124+
return;
125+
}
126+
122127
// check if is running
123128
if ( ! empty( $this->_summary['is_running'] ) && time() - $this->_summary['is_running'] < apply_filters( 'litespeed_imgoptm_new_req_interval', 3600 ) ) {
124129
self::debug( 'The previous req was in 3600s.' );

0 commit comments

Comments
 (0)