Skip to content

Commit

Permalink
3.2.2-rc4: Elementor can now purge correctly when update
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-hai committed Jun 8, 2020
1 parent d0a27cd commit 69f225d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions litespeed-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: LiteSpeed Cache
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
* Description: High-performance page caching and site optimization from LiteSpeed
* Version: 3.2.2-rc3
* Version: 3.2.2-rc4
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
Expand Down Expand Up @@ -33,7 +33,7 @@
return;
}

! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.2.2-rc3' );
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.2.2-rc4' );

! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
Expand Down
9 changes: 9 additions & 0 deletions thirdparty/elementor.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
namespace LiteSpeed\Thirdparty;
defined( 'WPINC' ) || exit;

use \LiteSpeed\Debug2;

class Elementor
{
public static function preload()
Expand All @@ -20,6 +22,13 @@ public static function preload()
}

if ( ! empty( $_SERVER[ 'HTTP_REFERER' ] ) && strpos( $_SERVER[ 'HTTP_REFERER' ], 'action=elementor' ) ) {
if ( ! empty( $_REQUEST['actions'] ) ) {
$json = json_decode( stripslashes( $_REQUEST['actions'] ), true );
// Debug2::debug( '3rd Elementor', $json );
if ( ! empty( $json[ 'save_builder' ][ 'action' ] ) && $json[ 'save_builder' ][ 'action' ] == 'save_builder' && ! empty( $json[ 'save_builder' ][ 'data' ][ 'status' ] ) && $json[ 'save_builder' ][ 'data' ][ 'status' ] == 'publish' ) {
return; // Save post, don't disable all in case we will allow fire crawler right away after purged
}
}
do_action( 'litespeed_disable_all', 'elementor edit mode in HTTP_REFERER' );
}
}
Expand Down

0 comments on commit 69f225d

Please sign in to comment.