initial commit
This commit is contained in:
93
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/entry.tpl.php
vendored
Normal file
93
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/entry.tpl.php
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
$menu_list = array(
|
||||
'cache' => __( 'Cache', 'litespeed-cache' ),
|
||||
'ttl' => __( 'TTL', 'litespeed-cache' ),
|
||||
'purge' => __( 'Purge', 'litespeed-cache' ),
|
||||
'excludes' => __( 'Excludes', 'litespeed-cache' ),
|
||||
'esi' => __( 'ESI', 'litespeed-cache' ),
|
||||
);
|
||||
|
||||
if ( ! $this->_is_multisite ) {
|
||||
$menu_list[ 'object' ] = __( 'Object', 'litespeed-cache' );
|
||||
$menu_list[ 'browser' ] = __( 'Browser', 'litespeed-cache' );
|
||||
}
|
||||
|
||||
$menu_list[ 'advanced' ] = __( 'Advanced', 'litespeed-cache' );
|
||||
|
||||
/**
|
||||
* Generate rules for setting usage
|
||||
* @since 1.6.2
|
||||
*/
|
||||
global $wp_roles;
|
||||
if ( !isset( $wp_roles ) ) {
|
||||
$wp_roles = new \WP_Roles();
|
||||
}
|
||||
|
||||
$roles = array();
|
||||
foreach ( $wp_roles->roles as $k => $v ) {
|
||||
$roles[ $k ] = $v[ 'name' ];
|
||||
}
|
||||
ksort( $roles );
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h1 class="litespeed-h1">
|
||||
<?php echo __('LiteSpeed Cache Settings', 'litespeed-cache'); ?>
|
||||
</h1>
|
||||
<span class="litespeed-desc">
|
||||
v<?php echo Core::VER; ?>
|
||||
</span>
|
||||
<hr class="wp-header-end">
|
||||
</div>
|
||||
<div class="litespeed-wrap">
|
||||
<h2 class="litespeed-header nav-tab-wrapper">
|
||||
<?php
|
||||
$i = 1;
|
||||
$accesskey_set = array();
|
||||
foreach ( $menu_list as $tab => $val ) {
|
||||
$accesskey = '';
|
||||
if ( $i <= 9 ) {
|
||||
$accesskey = "litespeed-accesskey='$i'";
|
||||
}
|
||||
else {
|
||||
$tmp = strtoupper( substr( $tab, 0, 1 ) );
|
||||
if ( ! in_array( $tmp, $accesskey_set ) ) {
|
||||
$accesskey_set[] = $tmp;
|
||||
$accesskey = "litespeed-accesskey='$tmp'";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<a class='litespeed-tab nav-tab' href='#$tab' data-litespeed-tab='$tab' $accesskey>$val</a>";
|
||||
$i ++;
|
||||
}
|
||||
do_action( 'litespeed_settings_tab', 'cache' );
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<div class="litespeed-body">
|
||||
<?php $this->cache_disabled_warning(); ?>
|
||||
|
||||
<?php
|
||||
$this->form_action();
|
||||
|
||||
require LSCWP_DIR . "tpl/inc/check_if_network_disable_all.php";
|
||||
require LSCWP_DIR . "tpl/cache/more_settings_tip.tpl.php";
|
||||
|
||||
// include all tpl for faster UE
|
||||
foreach ( $menu_list as $tab => $val ) {
|
||||
echo "<div data-litespeed-layout='$tab'>";
|
||||
require LSCWP_DIR . "tpl/cache/settings-$tab.tpl.php";
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
do_action( 'litespeed_settings_content', 'cache' );
|
||||
|
||||
$this->form_end();
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
54
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/entry_network.tpl.php
vendored
Normal file
54
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/entry_network.tpl.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
$menuArr = array(
|
||||
'cache' => __( 'Cache', 'litespeed-cache' ),
|
||||
'purge' => __( 'Purge', 'litespeed-cache' ),
|
||||
'excludes' => __( 'Excludes', 'litespeed-cache' ),
|
||||
'object' => __( 'Object', 'litespeed-cache' ),
|
||||
'browser' => __( 'Browser', 'litespeed-cache' ),
|
||||
'advanced' => __( 'Advanced', 'litespeed-cache' ),
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h1 class="litespeed-h1">
|
||||
<?php echo __('LiteSpeed Cache Network Cache Settings', 'litespeed-cache'); ?>
|
||||
</h1>
|
||||
<span class="litespeed-desc">
|
||||
v<?php echo Core::VER; ?>
|
||||
</span>
|
||||
<hr class="wp-header-end">
|
||||
</div>
|
||||
|
||||
<div class="litespeed-wrap">
|
||||
<h2 class="litespeed-header nav-tab-wrapper">
|
||||
<?php
|
||||
$i = 1;
|
||||
foreach ($menuArr as $tab => $val){
|
||||
$accesskey = $i <= 9 ? "litespeed-accesskey='$i'" : '';
|
||||
echo "<a class='litespeed-tab nav-tab' href='#$tab' data-litespeed-tab='$tab' $accesskey>$val</a>";
|
||||
$i ++;
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
<div class="litespeed-body">
|
||||
<?php $this->cache_disabled_warning(); ?>
|
||||
|
||||
<?php
|
||||
$this->form_action( Router::ACTION_SAVE_SETTINGS_NETWORK );
|
||||
|
||||
// include all tpl for faster UE
|
||||
foreach ($menuArr as $tab => $val) {
|
||||
echo "<div data-litespeed-layout='$tab'>";
|
||||
require LSCWP_DIR . "tpl/cache/network_settings-$tab.tpl.php";
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
$this->form_end( true );
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
18
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/more_settings_tip.tpl.php
vendored
Normal file
18
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/more_settings_tip.tpl.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
global $pagenow;
|
||||
if ( $pagenow != 'options-general.php' ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="litespeed-callout notice notice-success inline">
|
||||
|
||||
<h4><?php echo __( 'NOTE', 'litespeed-cache' ); ?></h4>
|
||||
|
||||
<p>
|
||||
<?php echo sprintf( __( 'More settings available under %s menu', 'litespeed-cache' ), '<code>' . __( 'LiteSpeed Cache', 'litespeed-cache' ) . '</code>' ); ?>
|
||||
</p>
|
||||
|
||||
</div>
|
18
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-advanced.tpl.php
vendored
Normal file
18
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-advanced.tpl.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Advanced Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#advanced-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<?php
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.login_cookie.tpl.php';
|
||||
?>
|
||||
|
||||
</tbody></table>
|
||||
|
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.browser.tpl.php';
|
32
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-cache.tpl.php
vendored
Normal file
32
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-cache.tpl.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Cache Control Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
<tr>
|
||||
<th><?php echo __( 'Network Enable Cache', 'litespeed-cache' ); ?></th>
|
||||
<td>
|
||||
<?php $this->build_switch( Base::O_CACHE ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __('Enabling LiteSpeed Cache for WordPress here enables the cache for the network.', 'litespeed-cache'); ?><br />
|
||||
<?php echo __('It is <b>STRONGLY</b> recommend that the compatibility with other plugins on a single/few sites is tested first.', 'litespeed-cache'); ?>
|
||||
<?php echo __('This is to ensure compatibility prior to enabling the cache for all sites.', 'litespeed-cache'); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_favicon.tpl.php';
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_resources.tpl.php';
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_mobile.tpl.php';
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_dropquery.tpl.php';
|
||||
?>
|
||||
|
||||
</tbody></table>
|
||||
|
22
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-excludes.tpl.php
vendored
Normal file
22
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-excludes.tpl.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Exclude Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#excludes-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<?php
|
||||
// Cookie
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.exclude_cookies.tpl.php';
|
||||
|
||||
// User Agent
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.exclude_useragent.tpl.php';
|
||||
?>
|
||||
|
||||
</tbody></table>
|
||||
|
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.object.tpl.php';
|
18
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-purge.tpl.php
vendored
Normal file
18
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/network_settings-purge.tpl.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Purge Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#purge-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<?php
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.purge_on_upgrade.tpl.php';
|
||||
?>
|
||||
|
||||
</tbody></table>
|
||||
|
57
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-advanced.tpl.php
vendored
Normal file
57
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-advanced.tpl.php
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Advanced Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#advanced-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'NOTICE:', 'litespeed-cache' ); ?></h4>
|
||||
<p><?php echo __( 'These settings are meant for ADVANCED USERS ONLY.', 'litespeed-cache' ); ?></p>
|
||||
</div>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<?php
|
||||
if ( ! $this->_is_multisite ) :
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.login_cookie.tpl.php';
|
||||
endif;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_UTIL_NO_HTTPS_VARY; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#improve-httphttps-compatibility' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_UTIL_INSTANT_CLICK; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'When a visitor hovers over a page link, preload that page. This will speed up the visit to that link.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#instant-click' ); ?>
|
||||
<br /><font class="litespeed-danger">
|
||||
⚠️
|
||||
<?php echo __( 'This will generate extra requests to the server, which will increase server load.', 'litespeed-cache' ); ?>
|
||||
</font>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
5
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-browser.tpl.php
vendored
Normal file
5
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-browser.tpl.php
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.browser.tpl.php';
|
155
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-cache.tpl.php
vendored
Normal file
155
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-cache.tpl.php
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Cache Control Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php if ( $this->_is_multisite ) : ?>
|
||||
<?php $this->build_switch( $id, array( __( 'OFF', 'litespeed-cache' ), __( 'ON', 'litespeed-cache' ), __( 'Use Network Admin Setting', 'litespeed-cache' ) ) ); ?>
|
||||
<?php else : ?>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<?php endif; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf(__('Please visit the <a %s>Information</a> page on how to test the cache.', 'litespeed-cache'),
|
||||
'href="https://docs.litespeedtech.com/lscache/lscwp/installation/#testing" target="_blank"'); ?>
|
||||
|
||||
<strong><?php echo __('NOTICE', 'litespeed-cache'); ?>: </strong><?php echo __('When disabling the cache, all cached entries for this site will be purged.', 'litespeed-cache'); ?>
|
||||
|
||||
<?php if ( $this->_is_multisite ): ?>
|
||||
<br><?php echo __('The network admin setting can be overridden here.', 'litespeed-cache'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! $this->conf( Base::O_CACHE ) && $this->conf( Base::O_CDN_QUIC ) ): ?>
|
||||
<br><font class="litespeed-success"><?php echo __( 'With QUIC.cloud CDN enabled, you may still be seeing cache headers from your local server.', 'litespeed-cache' ); ?></font>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_PRIV; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Privately cache frontend pages for logged-in users. (LSWS %s required)', 'litespeed-cache' ), 'v5.2.1+' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_COMMENTER; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Privately cache commenters that have pending comments. Disabling this option will serve non-cacheable pages to commenters. (LSWS %s required)', 'litespeed-cache' ), 'v5.2.1+' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_REST; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Cache requests made by WordPress REST API calls.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_PAGE_LOGIN; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Disabling this option may negatively affect performance.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ( ! $this->_is_multisite ) :
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_favicon.tpl.php';
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_resources.tpl.php';
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_mobile.tpl.php';
|
||||
endif;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_PRIV_URI; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'URI Paths containing these strings will NOT be cached as public.', 'litespeed-cache' ); ?>
|
||||
<?php $this->_uri_usage_example(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_FORCE_URI; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Paths containing these strings will be cached regardless of no-cacheable settings.', 'litespeed-cache' ); ?>
|
||||
<?php $this->_uri_usage_example(); ?>
|
||||
<br /><?php echo __( 'To define a custom TTL for a URI, add a space followed by the TTL value to the end of the URI.', 'litespeed-cache' ); ?>
|
||||
<?php echo sprintf( __( 'For example, %1$s defines a TTL of %2$s seconds for %3$s.', 'litespeed-cache' ), '<code>/mypath/mypage 300</code>', 300, '<code>/mypath/mypage</code>' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_FORCE_PUB_URI; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Paths containing these strings will be forced to public cached regardless of no-cacheable settings.', 'litespeed-cache' ); ?>
|
||||
<?php $this->_uri_usage_example(); ?>
|
||||
<br /><?php echo __( 'To define a custom TTL for a URI, add a space followed by the TTL value to the end of the URI.', 'litespeed-cache' ); ?>
|
||||
<?php echo sprintf( __( 'For example, %1$s defines a TTL of %2$s seconds for %3$s.', 'litespeed-cache' ), '<code>/mypath/mypage 300</code>', 300, '<code>/mypath/mypage</code>' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ( ! $this->_is_multisite ) :
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.cache_dropquery.tpl.php';
|
||||
endif;
|
||||
?>
|
||||
|
||||
</tbody></table>
|
||||
|
142
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-esi.tpl.php
vendored
Normal file
142
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-esi.tpl.php
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'ESI Settings', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#esi-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<div class="litespeed-description">
|
||||
<p><?php echo __( 'With ESI (Edge Side Includes), pages may be served from cache for logged-in users.', 'litespeed-cache' ) ; ?></p>
|
||||
<p><?php echo __( 'ESI allows you to designate parts of your dynamic page as separate fragments that are then assembled together to make the whole page. In other words, ESI lets you “punch holes” in a page, and then fill those holes with content that may be cached privately, cached publicly with its own TTL, or not cached at all.', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::learn_more( 'https://blog.litespeedtech.com/2017/08/30/wpw-private-cache-vs-public-cache/', __( 'WpW: Private Cache vs. Public Cache', 'litespeed-cache' ) ); ?>
|
||||
</p>
|
||||
<p>
|
||||
💡:
|
||||
<?php echo __( 'You can turn shortcodes into ESI blocks.', 'litespeed-cache' ) ; ?>
|
||||
<?php echo sprintf(
|
||||
__( 'Replace %1$s with %2$s.', 'litespeed-cache' ),
|
||||
'<code>[shortcodeA att1="val1" att2="val2"]</code>',
|
||||
'<code>[esi shortcodeA att1="val1" att2="val2"]</code>'
|
||||
) ; ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/admin/#turning-wordpress-shortcodes-into-esi-blocks' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url', __( 'ESI sample for developers', 'litespeed-cache' ) ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="litespeed-relative">
|
||||
|
||||
<?php if ( ! LSWCP_ESI_SUPPORT && ! $this->conf( Base::O_CDN_QUIC ) ) : ?>
|
||||
<div class="litespeed-callout-danger">
|
||||
<h4><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?></h4>
|
||||
<h4><?php echo __( 'These options are only available with LiteSpeed Enterprise Web Server or QUIC.cloud CDN.', 'litespeed-cache' ); ?></h4>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_ESI ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Turn ON to cache public pages for logged in users, and serve the Admin Bar and Comment Form via ESI blocks. These two blocks will be uncached unless enabled below.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_ESI_CACHE_ADMBAR ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __(' Cache the built-in Admin Bar ESI block.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_ESI_CACHE_COMMFORM ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Cache the built-in Comment Form ESI block.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_ESI_NONCE ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<div class="litespeed-row-flex">
|
||||
<div class="">
|
||||
<?php $this->build_textarea( $id ) ; ?>
|
||||
</div>
|
||||
<div class="litespeed-width-3-10">
|
||||
<p class="litespeed-desc">
|
||||
<?php echo __( 'The list will be merged with the predefined nonces in your local data file.', 'litespeed-cache' ); ?>
|
||||
<?php echo __( 'The latest data file is', 'litespeed-cache' ); ?>: <a href="https://github.com/litespeedtech/lscache_wp/blob/master/data/esi.nonces.txt" target="_blank">https://github.com/litespeedtech/lscache_wp/blob/master/data/esi.nonces.txt</a>
|
||||
<br /><font class="litespeed-success">
|
||||
<?php echo __( 'API', 'litespeed-cache' ); ?>:
|
||||
<?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_esi_nonces</code>' ); ?>
|
||||
</font>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'The above nonces will be converted to ESI automatically.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
<br /><?php echo __( 'An optional second parameter may be used to specify cache control. Use a space to separate', 'litespeed-cache' ); ?>: <code>my_nonce_action private</code>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Wildcard %1$s supported (match zero or more characters). For example, to match %2$s and %3$s, use %4$s.', 'litespeed-cache' ), '<code>*</code>', '<code>nonce_formid_1</code>', '<code>nonce_formid_3</code>', '<code>nonce_formid_*</code>' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_VARY_GROUP ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<table class="litespeed-vary-table wp-list-table striped litespeed-table form-table"><tbody>
|
||||
<?php foreach ( $roles as $role => $title ): ?>
|
||||
<tr>
|
||||
<td class='litespeed-vary-title'><?php echo $title ; ?></td>
|
||||
<td class='litespeed-vary-val'>
|
||||
<?php
|
||||
$this->build_input(
|
||||
$id . '[' . $role . ']',
|
||||
'litespeed-input-short',
|
||||
$this->cls( 'Vary' )->in_vary_group( $role )
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody></table>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'If your site contains public content that certain user roles can see but other roles cannot, you can specify a Vary Group for those user roles. For example, specifying an administrator vary group allows there to be a separate publicly-cached page tailored to administrators (with “edit” links, etc), while all other user roles see the default public page.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
|
||||
</div>
|
134
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-excludes.tpl.php
vendored
Normal file
134
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-excludes.tpl.php
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Exclude Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#excludes-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Paths containing these strings will not be cached.', 'litespeed-cache' ); ?>
|
||||
<?php $this->_uri_usage_example(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC_QS; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Query strings containing these parameters will not be cached.', 'litespeed-cache' ); ?>
|
||||
<?php echo sprintf( __( 'For example, for %s, %s and %s can be used here.', 'litespeed-cache' ), '<code>?aa=bb&cc=dd</code>', '<code>aa</code>', '<code>cc</code>' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC_CAT; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
$excludes_buf = '';
|
||||
if ( $this->conf( $id ) ) {
|
||||
$excludes_buf = implode( "\n", array_map( 'get_cat_name', $this->conf( $id ) ) );
|
||||
}
|
||||
$this->build_textarea( $id, false, $excludes_buf );
|
||||
?>
|
||||
<div class="litespeed-desc">
|
||||
<b><?php echo __( 'All categories are cached by default.', 'litespeed-cache' ); ?></b>
|
||||
<?php echo sprintf( __( 'To prevent %s from being cached, enter them here.', 'litespeed-cache' ), __( 'categories', 'litespeed-cache') ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'NOTE', 'litespeed-cache' ); ?>:</h4>
|
||||
<ol>
|
||||
<li><?php echo __( 'If the category name is not found, the category will be removed from the list on save.', 'litespeed-cache' ); ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC_TAG; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
$excludes_buf = '';
|
||||
if ( $this->conf( $id ) ) {
|
||||
$tag_names = array();
|
||||
foreach ( array_map( 'get_tag', $this->conf( $id ) ) as $tag ) {
|
||||
$tag_names[] = $tag->name;
|
||||
}
|
||||
if ( ! empty( $tag_names ) ) {
|
||||
$excludes_buf = implode( "\n", $tag_names );
|
||||
}
|
||||
}
|
||||
$this->build_textarea( $id, false, $excludes_buf );
|
||||
?>
|
||||
<div class="litespeed-desc">
|
||||
<b><?php echo __( 'All tags are cached by default.', 'litespeed-cache' ); ?></b>
|
||||
<?php echo sprintf( __( 'To prevent %s from being cached, enter them here.', 'litespeed-cache' ), __( 'tags', 'litespeed-cache') ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'NOTE', 'litespeed-cache' ); ?>:</h4>
|
||||
<ol>
|
||||
<li><?php echo __( 'If the tag slug is not found, the tag will be removed from the list on save.', 'litespeed-cache' ); ?></li>
|
||||
<li><?php echo sprintf( __( 'To exclude %1$s, insert %2$s.', 'litespeed-cache' ),
|
||||
'<code>http://www.example.com/tag/category/tag-slug/</code>',
|
||||
'<code>tag-slug</code>' ); ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ( ! $this->_is_multisite ) :
|
||||
// Cookie
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.exclude_cookies.tpl.php';
|
||||
|
||||
// User Agent
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.exclude_useragent.tpl.php';
|
||||
|
||||
endif;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC_ROLES; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Selected roles will be excluded from cache.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
<div class="litespeed-tick-list">
|
||||
<?php foreach ( $roles as $role => $title ): ?>
|
||||
<?php $this->build_checkbox( $id . '[]', $title, Control::cls()->in_cache_exc_roles( $role ), $role ); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
5
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-object.tpl.php
vendored
Normal file
5
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-object.tpl.php
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
require LSCWP_DIR . 'tpl/cache/settings_inc.object.tpl.php';
|
161
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-purge.tpl.php
vendored
Normal file
161
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-purge.tpl.php
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Purge Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#purge-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<?php
|
||||
$option_list = array(
|
||||
Base::O_PURGE_POST_ALL => __( 'All pages', 'litespeed-cache' ),
|
||||
Base::O_PURGE_POST_FRONTPAGE => __( 'Front page', 'litespeed-cache' ),
|
||||
Base::O_PURGE_POST_HOMEPAGE => __( 'Home page', 'litespeed-cache' ),
|
||||
Base::O_PURGE_POST_PAGES => __( 'Pages', 'litespeed-cache' ),
|
||||
|
||||
Base::O_PURGE_POST_PAGES_WITH_RECENT_POSTS => __( 'All pages with Recent Posts Widget', 'litespeed-cache' ),
|
||||
|
||||
Base::O_PURGE_POST_AUTHOR => __( 'Author archive', 'litespeed-cache' ),
|
||||
Base::O_PURGE_POST_POSTTYPE => __( 'Post type archive', 'litespeed-cache' ),
|
||||
|
||||
Base::O_PURGE_POST_YEAR => __( 'Yearly archive', 'litespeed-cache' ),
|
||||
Base::O_PURGE_POST_MONTH => __( 'Monthly archive', 'litespeed-cache' ),
|
||||
Base::O_PURGE_POST_DATE => __( 'Daily archive', 'litespeed-cache' ),
|
||||
|
||||
Base::O_PURGE_POST_TERM => __( 'Term archive (include category, tag, and tax)', 'litespeed-cache' ),
|
||||
);
|
||||
|
||||
// break line at these ids
|
||||
$break_arr = array(
|
||||
Base::O_PURGE_POST_PAGES,
|
||||
Base::O_PURGE_POST_PAGES_WITH_RECENT_POSTS,
|
||||
Base::O_PURGE_POST_POSTTYPE,
|
||||
Base::O_PURGE_POST_DATE,
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<?php if ( ! $this->_is_multisite ) : ?>
|
||||
<?php require LSCWP_DIR . 'tpl/cache/settings_inc.purge_on_upgrade.tpl.php'; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<tr>
|
||||
<th><?php echo __( 'Auto Purge Rules For Publish/Update', 'litespeed-cache' ); ?></th>
|
||||
<td>
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'Note', 'litespeed-cache' ); ?></h4>
|
||||
<p>
|
||||
<?php echo __( 'Select "All" if there are dynamic widgets linked to posts on pages other than the front or home pages.', 'litespeed-cache' ); ?><br />
|
||||
<?php echo __( 'Other checkboxes will be ignored.', 'litespeed-cache' ); ?><br />
|
||||
<?php echo __( 'Select only the archive types that are currently used, the others can be left unchecked.', 'litespeed-cache' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="litespeed-top20">
|
||||
<div class="litespeed-tick-wrapper">
|
||||
<?php
|
||||
foreach ( $option_list as $id => $title ) {
|
||||
|
||||
$this->build_checkbox( $id, $title );
|
||||
|
||||
if ( in_array( $id, $break_arr ) ) {
|
||||
echo '</div><div class="litespeed-tick-wrapper litespeed-top10">';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Select which pages will be automatically purged when posts are published/updated.', 'litespeed-cache' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_PURGE_STALE; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'If ON, the stale copy of a cached page will be shown to visitors until a new cache copy is available. Reduces the server load for following visits. If OFF, the page will be dynamically generated while visitors wait.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#serve-stale' ); ?>
|
||||
</div>
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'Note', 'litespeed-cache' ); ?></h4>
|
||||
<p>
|
||||
<?php echo __( 'By design, this option may serve stale content. Do not enable this option, if that is not OK with you.', 'litespeed-cache' ); ?><br />
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_PURGE_TIMED_URLS; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id, 80 ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'The URLs here (one per line) will be purged automatically at the time set in the option "%s".', 'litespeed-cache' ), __( 'Scheduled Purge Time', 'litespeed-cache' ) ); ?><br />
|
||||
<?php echo sprintf( __( 'Both %1$s and %2$s are acceptable.', 'litespeed-cache' ), '<code>http://www.example.com/path/url.php</code>', '<code>/path/url.php</code>' ); ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Wildcard %1$s supported (match zero or more characters). For example, to match %2$s and %3$s, use %4$s.', 'litespeed-cache' ), '<code>*</code>', '<code>/path/u-1.html</code>', '<code>/path/u-2.html</code>', '<code>/path/u-*.html</code>' ); ?>
|
||||
</div>
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'Note', 'litespeed-cache' ); ?></h4>
|
||||
<p>
|
||||
<?php echo __( 'For URLs with wildcards, there may be a delay in initiating scheduled purge.', 'litespeed-cache' ); ?><br />
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#scheduled-purge-urls' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_PURGE_TIMED_URLS_TIME; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id, null, null, 'time' ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Specify the time to purge the "%s" list.', 'litespeed-cache' ), __( 'Scheduled Purge URLs', 'litespeed-cache' ) ); ?>
|
||||
<?php echo sprintf( __( 'Current server time is %s.', 'litespeed-cache' ), '<code>' . date( 'H:i:s' ) . '</code>' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_PURGE_HOOK_ALL; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
|
||||
<div class="litespeed-textarea-recommended">
|
||||
<div>
|
||||
<?php $this->build_textarea( $id, 50 ); ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->recommended( $id ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'A Purge All will be executed when WordPress runs these hooks.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#purge-all-hooks' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody></table>
|
||||
|
112
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-ttl.tpl.php
vendored
Normal file
112
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings-ttl.tpl.php
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'TTL', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#ttl-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_PUB ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ) ; ?> <?php $this->readable_seconds() ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __('Specify how long, in seconds, public pages are cached.', 'litespeed-cache'); ?>
|
||||
<?php $this->recommended( $id ) ; ?>
|
||||
<?php $this->_validate_ttl( $id, 30 ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_PRIV ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ) ; ?> <?php $this->readable_seconds() ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Specify how long, in seconds, private pages are cached.', 'litespeed-cache' ) ; ?>
|
||||
<?php $this->recommended( $id ) ; ?>
|
||||
<?php $this->_validate_ttl( $id, 60, 3600 ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_FRONTPAGE ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ) ; ?> <?php $this->readable_seconds() ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Specify how long, in seconds, the front page is cached.', 'litespeed-cache' ) ; ?>
|
||||
<?php $this->recommended( $id ) ; ?>
|
||||
<?php $this->_validate_ttl( $id, 30 ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_FEED ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ) ; ?> <?php $this->readable_seconds() ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Specify how long, in seconds, feeds are cached.', 'litespeed-cache' ) ; ?>
|
||||
<?php echo __( 'If this is set to a number less than 30, feeds will not be cached.', 'litespeed-cache' ) ; ?>
|
||||
<?php $this->recommended( $id ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_REST ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ) ; ?> <?php $this->readable_seconds() ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Specify how long, in seconds, REST calls are cached.', 'litespeed-cache' ) ; ?>
|
||||
<?php echo __( 'If this is set to a number less than 30, feeds will not be cached.', 'litespeed-cache' ) ; ?>
|
||||
<?php $this->recommended( $id ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_STATUS ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
|
||||
<div class="litespeed-textarea-recommended">
|
||||
<div>
|
||||
<?php $this->build_textarea( $id, 30 ) ; ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->recommended( $id ) ; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Specify an HTTP status code and the number of seconds to cache that page, separated by a space.', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::one_per_line(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
|
48
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.browser.tpl.php
vendored
Normal file
48
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.browser.tpl.php
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Browser Cache Settings', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#browser-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<?php if ( LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_OLS' ) : ?>
|
||||
<div class="litespeed-callout notice notice-warning inline">
|
||||
<h4><?php echo __( 'NOTICE:', 'litespeed-cache' ); ?></h4>
|
||||
<p><?php echo __( 'OpenLiteSpeed users please check this', 'litespeed-cache' ); ?>:
|
||||
<?php Doc::learn_more( 'https://openlitespeed.org/kb/how-to-set-up-custom-headers/', __( 'Setting Up Custom Headers', 'litespeed-cache' ) ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_BROWSER; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Browser caching stores static files locally in the user\'s browser. Turn on this setting to reduce repeated requests for static files.', 'litespeed-cache' ); ?>
|
||||
<br /><?php Doc::notice_htaccess(); ?>
|
||||
<br /><?php echo sprintf( __( 'You can turn on browser caching in server admin too. <a %s>Learn more about LiteSpeed browser cache settings</a>.', 'litespeed-cache' ), 'href="https://docs.litespeedtech.com/lscache/lscwp/cache/#how-to-set-it-up" target="_blank"' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_TTL_BROWSER; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ); ?> <?php $this->readable_seconds(); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'The amount of time, in seconds, that files will be stored in browser cache before expiring.', 'litespeed-cache' ); ?>
|
||||
<?php $this->recommended( $id ); ?>
|
||||
<?php $this->_validate_ttl( $id, 30 ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_DROP_QS; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id, 40 ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Ignore certain query strings when caching. (LSWS %s required)', 'litespeed-cache' ), 'v5.2.3+' ); ?>
|
||||
<?php echo sprintf( __( 'For example, to drop parameters beginning with %s, %s can be used here.', 'litespeed-cache' ), '<code>utm</code>', '<code>utm*</code>' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#drop-query-string' ); ?>
|
||||
|
||||
<br />
|
||||
<?php Doc::one_per_line(); ?>
|
||||
|
||||
<br /><?php Doc::notice_htaccess() ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
19
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.cache_favicon.tpl.php
vendored
Normal file
19
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.cache_favicon.tpl.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_FAVICON ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'favicon.ico is requested on most pages.', 'litespeed-cache' ) ; ?>
|
||||
<?php echo __( 'Caching this resource may improve server performance by avoiding unnecessary PHP calls.', 'litespeed-cache' ) ; ?>
|
||||
<br /><?php Doc::notice_htaccess() ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
77
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.cache_mobile.tpl.php
vendored
Normal file
77
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.cache_mobile.tpl.php
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
|
||||
?>
|
||||
|
||||
<!-- build_setting_mobile_view start -->
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_MOBILE; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
$this->build_switch( $id );
|
||||
?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Serve a separate cache copy for mobile visitors.', 'litespeed-cache' ); ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#cache-mobile', __( 'Learn more about when this is needed', 'litespeed-cache' ) ); ?>
|
||||
<br /><?php Doc::notice_htaccess(); ?>
|
||||
<br /><?php Doc::crawler_affected(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="litespeed-padding-left">
|
||||
<?php $id = Base::O_CACHE_MOBILE_RULES; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
// if set, use value as input value
|
||||
if ( $this->conf( Base::O_CACHE_MOBILE ) ) {
|
||||
|
||||
// if enabled, check the setting in file
|
||||
if ( defined( 'LITESPEED_ON' ) ) {
|
||||
|
||||
try {
|
||||
$mobile_agents = Htaccess::cls()->current_mobile_agents();
|
||||
if ( $mobile_agents !== Utility::arr2regex( $this->conf( $id ), true ) ) {
|
||||
echo '<div class="litespeed-callout notice notice-error inline"><p>'
|
||||
. __( 'Htaccess did not match configuration option.', 'litespeed-cache' )
|
||||
. ' ' . sprintf( __( 'Htaccess rule is: %s', 'litespeed-cache' ), '<code>' . $mobile_agents . '</code>' )
|
||||
. '</p></div>';
|
||||
}
|
||||
} catch( \Exception $e ) {
|
||||
echo '<div class="litespeed-callout notice notice-error inline"><p>' . $e->getMessage() . '</p></div>';
|
||||
}
|
||||
|
||||
}
|
||||
} ?>
|
||||
|
||||
<div class="litespeed-textarea-recommended">
|
||||
<div>
|
||||
<?php $this->build_textarea( $id, 40 ); ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php $this->recommended( $id ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="litespeed-desc">
|
||||
<?php Doc::one_per_line(); ?>
|
||||
|
||||
<?php $this->_validate_syntax( $id ); ?>
|
||||
|
||||
<?php if ( $this->conf( Base::O_CACHE_MOBILE ) && ! $this->conf( $id ) ) : ?>
|
||||
<font class="litespeed-warning">
|
||||
❌
|
||||
<?php echo sprintf( __( 'If %1$s is %2$s, then %3$s must be populated!', 'litespeed-cache' ), '<code>' . __('Cache Mobile', 'litespeed-cache') . '</code>', '<code>' . __('ON', 'litespeed-cache') . '</code>', '<code>' . __('List of Mobile User Agents', 'litespeed-cache') . '</code>' ); ?>
|
||||
</font>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- build_setting_mobile_view end -->
|
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace LiteSpeed;
|
||||
defined( 'WPINC' ) || exit;
|
||||
?>
|
||||
|
||||
<!-- build_setting_cache_resources -->
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_RES; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Some themes and plugins add resources via a PHP request.', 'litespeed-cache' ); ?>
|
||||
<?php echo __( 'Caching these pages may improve server performance by avoiding unnecessary PHP calls.', 'litespeed-cache' ); ?>
|
||||
<br /><?php Doc::notice_htaccess(); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC_COOKIES ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'To prevent %s from being cached, enter them here.', 'litespeed-cache' ), __( 'cookies', 'litespeed-cache') ) ; ?>
|
||||
<?php Doc::one_per_line() ; ?>
|
||||
<?php $this->_validate_syntax( $id ) ; ?>
|
||||
<br /><?php Doc::notice_htaccess() ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_EXC_USERAGENTS ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'To prevent %s from being cached, enter them here.', 'litespeed-cache' ), __( 'user agents', 'litespeed-cache') ) ; ?>
|
||||
<?php Doc::one_per_line() ; ?>
|
||||
<?php $this->_validate_syntax( $id ) ; ?>
|
||||
<br /><?php Doc::notice_htaccess() ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
66
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.login_cookie.tpl.php
vendored
Normal file
66
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.login_cookie.tpl.php
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_CACHE_LOGIN_COOKIE ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
$this->build_input( $id ) ;
|
||||
|
||||
$this->_validate_syntax( $id ) ;
|
||||
|
||||
echo '<p class="litespeed-desc">' . __('SYNTAX: alphanumeric and "_".', 'litespeed-cache')
|
||||
. ' ' . __('No spaces and case sensitive.', 'litespeed-cache')
|
||||
. ' ' . __('MUST BE UNIQUE FROM OTHER WEB APPLICATIONS.', 'litespeed-cache')
|
||||
. '</p>'
|
||||
. '<p class="litespeed-desc">'
|
||||
. sprintf(__('The default login cookie is %s.', 'litespeed-cache'), '<code>_lscache_vary</code>')
|
||||
. ' ' . __('The server will determine if the user is logged in based on the existence of this cookie.', 'litespeed-cache')
|
||||
. ' ' . __('This setting is useful for those that have multiple web applications for the same domain.', 'litespeed-cache')
|
||||
. ' ' . __('If every web application uses the same cookie, the server may confuse whether a user is logged in or not.', 'litespeed-cache')
|
||||
. ' ' . __('The cookie set here will be used for this WordPress installation.', 'litespeed-cache')
|
||||
. '</p>'
|
||||
. '<p class="litespeed-desc">'
|
||||
. __('Example use case:', 'litespeed-cache')
|
||||
. '<br />'
|
||||
. sprintf(__('There is a WordPress installed for %s.', 'litespeed-cache'), '<u>www.example.com</u>')
|
||||
. '<br />'
|
||||
. sprintf(__('Then another WordPress is installed (NOT MULTISITE) at %s', 'litespeed-cache'), '<u>www.example.com/blog/</u>')
|
||||
. ' ' . __('The cache needs to distinguish who is logged into which WordPress site in order to cache correctly.', 'litespeed-cache')
|
||||
. '<br />'
|
||||
; ?>
|
||||
<?php Doc::notice_htaccess() ;
|
||||
echo '</p>' ; ?>
|
||||
<?php
|
||||
|
||||
if ( preg_match( '#[^\w\-]#', $this->conf( $id ) ) ) {
|
||||
echo '<div class="litespeed-callout notice notice-error inline"><p>❌ ' . __( 'Invalid login cookie. Invalid characters found.', 'litespeed-cache' ) . '</p></div>' ;
|
||||
}
|
||||
|
||||
if ( defined( 'LITESPEED_ON' ) && $this->conf( $id ) ) {
|
||||
$cookie_rule = '';
|
||||
try {
|
||||
$cookie_rule = Htaccess::cls()->current_login_cookie() ;
|
||||
} catch ( \Exception $e ) {
|
||||
echo '<div class="litespeed-callout notice notice-error inline"><p>' . $e->getMessage() . '</p></div>' ;
|
||||
}
|
||||
|
||||
$cookie_arr = explode( ',', $cookie_rule ) ;
|
||||
if ( ! in_array( $this->conf( $id ), $cookie_arr ) ) {
|
||||
echo '<div class="litespeed-callout notice notice-warning inline"><p>'
|
||||
. __( 'WARNING: The .htaccess login cookie and Database login cookie do not match.', 'litespeed-cache' )
|
||||
. '</p></div>'
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
218
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.object.tpl.php
vendored
Normal file
218
hamrokhaanpaan/wp-content/__plugins/litespeed-cache/tpl/cache/settings_inc.object.tpl.php
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
|
||||
|
||||
$lang_enabled = '<font class="litespeed-success">' . __( 'Enabled', 'litespeed-cache' ) . '</font>' ;
|
||||
$lang_disabled = '<font class="litespeed-warning">' . __( 'Disabled', 'litespeed-cache' ) . '</font>' ;
|
||||
|
||||
$mem_enabled = class_exists( 'Memcached' ) ? $lang_enabled : $lang_disabled ;
|
||||
$redis_enabled = class_exists( 'Redis' ) ? $lang_enabled : $lang_disabled ;
|
||||
|
||||
$mem_conn = $this->cls( 'Object_Cache' )->test_connection();
|
||||
if ( $mem_conn === null ) {
|
||||
$mem_conn_desc = '<font class="litespeed-desc">' . __( 'Not Available', 'litespeed-cache' ) . '</font>' ;
|
||||
}
|
||||
elseif ( $mem_conn ) {
|
||||
$mem_conn_desc = '<font class="litespeed-success">' . __( 'Passed', 'litespeed-cache' ) . '</font>' ;
|
||||
}
|
||||
else {
|
||||
$mem_conn_desc = '<font class="litespeed-warning">' . __( 'Failed', 'litespeed-cache' ) . '</font>' ;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<h3 class="litespeed-title-short">
|
||||
<?php echo __( 'Object Cache Settings', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#object-tab' ); ?>
|
||||
</h3>
|
||||
|
||||
<table class="wp-list-table striped litespeed-table"><tbody>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Use external object cache functionality.', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/admin/#memcached-lsmcd-and-redis-object-cache-support-in-lscwp' ); ?>
|
||||
</div>
|
||||
<div class="litespeed-block">
|
||||
|
||||
<div class='litespeed-col-auto'>
|
||||
<h4><?php echo __( 'Status', 'litespeed-cache' ) ; ?></h4>
|
||||
</div>
|
||||
<div class='litespeed-col-auto'>
|
||||
<?php echo sprintf( __( '%s Extension', 'litespeed-cache' ), 'Memcached' ) ; ?>: <?php echo $mem_enabled ; ?><br />
|
||||
<?php echo sprintf( __( '%s Extension', 'litespeed-cache' ), 'Redis' ) ; ?>: <?php echo $redis_enabled ; ?><br />
|
||||
<?php echo __( 'Connection Test', 'litespeed-cache' ) ; ?>: <?php echo $mem_conn_desc ; ?>
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/admin/#how-to-debug' ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_KIND ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id, array( 'Memcached', 'Redis' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_HOST; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Your %s Hostname or IP address.', 'litespeed-cache' ), 'Memcached/<a href="https://docs.litespeedtech.com/products/lsmcd/" target="_blank">LSMCD</a>/Redis' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_PORT; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id, 'litespeed-input-short2' ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Default port for %1$s is %2$s.', 'litespeed-cache' ), 'Memcached', '<code>11211</code>' ) ; ?>
|
||||
<?php echo sprintf( __( 'Default port for %1$s is %2$s.', 'litespeed-cache' ), 'Redis', '<code>6379</code>' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_LIFE; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id, 'litespeed-input-short2' ) ; ?> <?php echo __( 'seconds', 'litespeed-cache' ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Default TTL for cached objects.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_USER; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Only available when %s is installed.', 'litespeed-cache' ), 'SASL' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_PSWD; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Specify the password used when connecting.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_DB_ID; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_input( $id, 'litespeed-input-short' ); ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Database to be used', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_GLOBAL_GROUPS; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id, 30 ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Groups cached at the network level.', 'litespeed-cache' ) ; ?>
|
||||
<?php Doc::one_per_line() ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_NON_PERSISTENT_GROUPS; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_textarea( $id, 30 ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php Doc::one_per_line() ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_PERSISTENT; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Use keep-alive connections to speed up cache operations.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_ADMIN; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'Improve wp-admin speed through caching. (May encounter expired data)', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_OBJECT_TRANSIENTS; ?>
|
||||
<?php $this->title( $id ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo sprintf( __( 'Save transients in database when %1$s is %2$s.', 'litespeed-cache' ), '<code>' . Lang::title( Base::O_OBJECT_ADMIN ) . '</code>', '<code>' . __( 'OFF', 'litespeed-cache' ) . '</code>' ) ; ?>
|
||||
<br />
|
||||
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#store-transients' ); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody></table>
|
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace LiteSpeed ;
|
||||
defined( 'WPINC' ) || exit ;
|
||||
?>
|
||||
|
||||
<!-- build_setting_purge_on_upgrade -->
|
||||
<tr>
|
||||
<th>
|
||||
<?php $id = Base::O_PURGE_ON_UPGRADE ; ?>
|
||||
<?php $this->title( $id ) ; ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php $this->build_switch( $id ) ; ?>
|
||||
<div class="litespeed-desc">
|
||||
<?php echo __( 'When enabled, the cache will automatically purge when any plugin, theme or the WordPress core is upgraded.', 'litespeed-cache' ) ; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
Reference in New Issue
Block a user