/home/lnzliplg/public_html/thirdparty.tar
wp-postratings.cls.php 0000644 00000001170 15173132672 0011044 0 ustar 00 <?php
// phpcs:ignoreFile
/**
* The Third Party integration with the WP-PostRatings plugin.
*
* @since 1.1.1
*/
namespace LiteSpeed\Thirdparty;
defined('WPINC') || exit();
class WP_PostRatings {
/**
* Detects if plugin is installed.
*
* @since 1.1.1
* @access public
*/
public static function detect() {
if (defined('WP_POSTRATINGS_VERSION')) {
add_action('rate_post', __CLASS__ . '::flush', 10, 3);
}
}
/**
* Purges the cache
*
* @since 1.1.1
* @access public
*/
public static function flush( $uid, $post_id, $post_ratings_score ) {
do_action('litespeed_purge_post', $post_id);
}
}
woocommerce.tab.tpl.php 0000644 00000000346 15173132672 0011151 0 ustar 00 <?php
/**
* WooCommerce tab template for LiteSpeed Cache plugin.
*
* @package LiteSpeed
*/
defined( 'WPINC' ) || exit;
?>
<a class='litespeed-tab nav-tab' href='#woocommerce' data-litespeed-tab='woocommerce'>WooCommerce</a>
aelia-currencyswitcher.cls.php 0000644 00000003411 15173132672 0012517 0 ustar 00 <?php
// phpcs:ignoreFile
/**
* The Third Party integration with the Aelia CurrencySwitcher plugin.
*
* @since 1.0.13
* @since 2.6 Removed hook_vary as OLS supports vary header already
* @package LiteSpeed
* @subpackage LiteSpeed_Cache/thirdparty
*/
namespace LiteSpeed\Thirdparty;
defined('WPINC') || exit();
use LiteSpeed\API;
class Aelia_CurrencySwitcher {
private static $_cookies = array( 'aelia_cs_selected_currency', 'aelia_customer_country', 'aelia_customer_state', 'aelia_tax_exempt' );
/**
* Detects if WooCommerce is installed.
*
* @since 1.0.13
* @access public
*/
public static function detect() {
if (defined('WOOCOMMERCE_VERSION') && isset($GLOBALS['woocommerce-aelia-currencyswitcher']) && is_object($GLOBALS['woocommerce-aelia-currencyswitcher'])) {
// Not all pages need to add vary, so need to use this API to set conditions
self::$_cookies = apply_filters('litespeed_3rd_aelia_cookies', self::$_cookies);
add_filter('litespeed_vary_curr_cookies', __CLASS__ . '::check_cookies'); // this is for vary response headers, only add when needed
add_filter('litespeed_vary_cookies', __CLASS__ . '::register_cookies'); // this is for rewrite rules, so always add
}
}
public static function register_cookies( $list ) {
return array_merge($list, self::$_cookies);
}
/**
* If the page is not a woocommerce page, ignore the logic.
* Else check cookies. If cookies are set, set the vary headers, else do not cache the page.
*
* @since 1.0.13
* @access public
*/
public static function check_cookies( $list ) {
// NOTE: is_cart and is_checkout should also be checked, but will be checked by woocommerce anyway.
if (!is_woocommerce()) {
return $list;
}
return array_merge($list, self::$_cookies);
}
}
wc-pdf-product-vouchers.cls.php 0000644 00000001241 15173132672 0012534 0 ustar 00 <?php
// phpcs:ignoreFile
/**
* The Third Party integration with WooCommerce PDF Product Vouchers.
*
* @since 5.1.0
*/
namespace LiteSpeed\Thirdparty;
defined('WPINC') || exit();
class WC_PDF_Product_Vouchers {
/**
* Do not cache generated vouchers
*
* @since 5.1.0
*/
public static function detect() {
if (!class_exists('\WC_PDF_Product_Vouchers_Loader')) {
return;
}
$is_voucher = !empty($_GET['post_type']) && 'wc_voucher' === $_GET['post_type'];
$has_key = !empty($_GET['voucher_key']) || !empty($_GET['key']);
if ($is_voucher && $has_key) {
do_action('litespeed_control_set_nocache', '3rd WC PDF Product Voucher');
}
}
}
wp-polls.cls.php 0000644 00000000770 15173132673 0007626 0 ustar 00 <?php
// phpcs:ignoreFile
/**
* The Third Party integration with the WP-Polls plugin.
*
* @since 1.0.7
*/
namespace LiteSpeed\Thirdparty;
defined('WPINC') || exit();
// todo: need test
class Wp_Polls {
public static function detect() {
add_filter('wp_polls_display_pollvote', __CLASS__ . '::set_control');
add_filter('wp_polls_display_pollresult', __CLASS__ . '::set_control');
}
public static function set_control() {
do_action('litespeed_control_set_nocache', 'wp polls');
}
}
woocommerce.content.tpl.php 0000644 00000007023 15173132673 0012055 0 ustar 00 <?php
// phpcs:ignoreFile
namespace LiteSpeed\Thirdparty;
defined( 'WPINC' ) || exit;
use LiteSpeed\API;
use LiteSpeed\Doc;
use LiteSpeed\Admin_Display;
use LiteSpeed\Lang;
use LiteSpeed\Base;
?>
<div data-litespeed-layout='woocommerce'>
<h3 class="litespeed-title-short">
<?php echo __( 'WooCommerce Settings', 'litespeed-cache' ); ?>
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#woocommerce-tab' ); ?>
</h3>
<div class="litespeed-callout notice notice-warning inline">
<h4><?php echo __( 'NOTICE:', 'litespeed-cache' ); ?></h4>
<p><?php echo __( 'After verifying that the cache works in general, please test the cart.', 'litespeed-cache' ); ?></p>
<p><?php printf( __( 'To test the cart, visit the <a %s>FAQ</a>.', 'litespeed-cache' ), 'href="https://docs.litespeedtech.com/lscache/lscwp/installation/#non-cacheable-pages" target="_blank"' ); ?></p>
<p><?php echo __( 'By default, the My Account, Checkout, and Cart pages are automatically excluded from caching. Misconfiguration of page associations in WooCommerce settings may cause some pages to be erroneously excluded.', 'litespeed-cache' ); ?></p>
</div>
<table class="wp-list-table striped litespeed-table">
<tbody>
<tr>
<th>
<?php $id = self::O_UPDATE_INTERVAL; ?>
<?php echo __( 'Product Update Interval', 'litespeed-cache' ); ?>
</th>
<td>
<?php
$options = array(
self::O_PQS_CS => __( 'Purge product on changes to the quantity or stock status.', 'litespeed-cache' ) . ' ' . __( 'Purge categories only when stock status changes.', 'litespeed-cache' ),
self::O_PS_CS => __( 'Purge product and categories only when the stock status changes.', 'litespeed-cache' ),
self::O_PS_CN => __( 'Purge product only when the stock status changes.', 'litespeed-cache' ) . ' ' . __( 'Do not purge categories on changes to the quantity or stock status.', 'litespeed-cache' ),
self::O_PQS_CQS => __( 'Always purge both product and categories on changes to the quantity or stock status.', 'litespeed-cache' ),
);
$conf = (int) apply_filters( 'litespeed_conf', $id );
foreach ( $options as $k => $v ) :
$checked = (int) $k === $conf ? ' checked ' : '';
?>
<?php do_action( 'litespeed_setting_enroll', $id ); ?>
<div class='litespeed-radio-row'>
<input type='radio' autocomplete='off' name='<?php echo $id; ?>' id='conf_<?php echo $id; ?>_<?php echo $k; ?>' value='<?php echo $k; ?>' <?php echo $checked; ?> />
<label for='conf_<?php echo $id; ?>_<?php echo $k; ?>'><?php echo $v; ?></label>
</div>
<?php endforeach; ?>
<div class="litespeed-desc">
<?php echo __( 'Determines how changes in product quantity and product stock status affect product pages and their associated category pages.', 'litespeed-cache' ); ?>
</div>
</td>
</tr>
<tr>
<th>
<?php $id = self::O_CART_VARY; ?>
<?php echo __( 'Vary for Mini Cart', 'litespeed-cache' ); ?>
</th>
<td>
<?php
$conf = (int) apply_filters( 'litespeed_conf', $id );
$this->cls( 'Admin_Display' )->build_switch( $id );
?>
<div class="litespeed-desc">
<?php echo __( 'Generate a separate vary cache copy for the mini cart when the cart is not empty.', 'litespeed-cache' ); ?>
<?php echo __( 'If your theme does not use JS to update the mini cart, you must enable this option to display the correct cart contents.', 'litespeed-cache' ); ?>
<br /><?php Doc::notice_htaccess(); ?>
</div>
</td>
</tr>
</tbody>
</table>
</div>