Skip to content

Commit

Permalink
v7.0-b29: * **Tag** Appended AJAX action to cache tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Zheng committed Dec 13, 2024
1 parent d85aadd commit 2cba82d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions litespeed-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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: 7.0-b28
* Version: 7.0-b29
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
Expand Down Expand Up @@ -34,7 +34,7 @@
return;
}

!defined('LSCWP_V') && define('LSCWP_V', '7.0-b28');
!defined('LSCWP_V') && define('LSCWP_V', '7.0-b29');

!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
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
* **GUI** Fixed an issue that irremovable banner can't be echoed directly.
* **GUI** Page speed chart is limited to cacheable Servers only.
* **Tag** Fixed a potential warning in tags. (ikiterder)
* **Tag** Appended AJAX action to cache tags.
* **Misc** Improved readme file by adding min supported PHP/WP versions. (Viktor Szépe)
* **Misc** Rely on just-in-time translation loading. (Pascal Birchler #738)
* **Misc** Check filename is valid or not before saving file to fix the possible Object Cache log issue. (Mahdi Akrami #761)
Expand Down
10 changes: 8 additions & 2 deletions src/tag.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Tag extends Root
const TYPE_WIDGET = 'W.';
const TYPE_ESI = 'ESI.';
const TYPE_REST = 'REST';
const TYPE_AJAX = 'AJAX.';
const TYPE_LIST = 'LIST';
const TYPE_MIN = 'MIN';
const TYPE_LOCALRES = 'LOCALRES';
Expand Down Expand Up @@ -263,8 +264,8 @@ private static function _build_type_tags()
$tags[] = self::TYPE_AUTHOR . $queried_obj_id;
} elseif (is_date()) {
global $post;
if($post && isset($post->post_date)){

if ($post && isset($post->post_date)) {
$date = $post->post_date;
$date = strtotime($date);
if (is_day()) {
Expand Down Expand Up @@ -312,6 +313,11 @@ private static function _build_type_tags()
}
}

// Append AJAX action tag
if (Router::is_ajax() && !empty($_REQUEST['action'])) {
$tags[] = self::TYPE_AJAX . $_REQUEST['action'];
}

return $tags;
}

Expand Down

0 comments on commit 2cba82d

Please sign in to comment.