JFIF $ d d 7 * Z qn )ZP 0 !1 A "#a$2Qr D8 a Ri [f \m I ykI w0 c u F c Rı?lO7 к _f˓ [C $殷WF< _W ԣ s Kc ëI zyQy /_LK ℂ ;C",p F A : /] =H ~ , l s / 9 ć: [=/#f ; ) x { ٛE Q )~ = 𘙲r*2~ a _V = ' ku m F D } KYYC )( { * g& f `툪 r y ` = ^ c J. I ]( * `wq 1dđ #̩ ͑ 0 ; H ] u 搂 @:~ ו K L N s h } O I R* 8 :2 ! lD JV o ( 3 = M ( z Ȱ+i *N A r6K n S l ) ! J J Ӂ* % ݉?|D } d5: eP0 R; {$X' x F @ .ÊB {,WJ uQ ɲRI ;9 Q E琯 6 2fT .DU J ;*c P A\IL Nj! J ۱+ O\ ͔ ] ޒ S J ȧ c%A N ol ՎprU L Zԛe r E2= X D Xg VQeӓ k y P7 U* o m Q I s ,K `) 6\G3t?pgjr m ۛجw luGt f h 9uyP 0D;Uڽ"OXl i f $ ) &|ML 0 Z rm1 [ H XP l P R0 'G=i 2N +0 e 2 ]] 9 VT P O 7 h(F * 癈 ' = Q VZD F,d ߬ ~ T X G[ `le 69C R(!S2! P < 0 x < !1AQ "Raq 02Br #S CTb ? Ζ "]mH5WR 7 k.ۛ ! } Q~ + yԏ z |@ T20 S~ K e k *zF f^2X *( @ 8 r ? C I uI|֓>^Ex LgNU Y+{.R Ѫ τV YT D I 6 2 '8Y2 7'\T P.6 d &˦ @V q i |8 -O Ε ] ʔ U= T L 8= ;6c | !qfF3 a ů& ~$ l} 'NW U s$U k^S V : U#6w + +s &r+n ڐ { @ 29gL u " T Ù M=6 (^ "7 r}=6Yݾ lC u hquymp Ǧ G jhs ǜNl ɻ} o 7 #S6 a w 4 ! OS r D 5 7 % | ?x> L | / nD 6?/8 w # [ ) L 7 +6〼T A T g ! %5 Mm Z /c -{1_Je "| ^$ 'O & ޱմ < H vNqϡQ$ < 6 &Nݛ ֨tǻN (9 n ru~'όN sMG& ,uH Kw *Ī 5@ u6 BԒ i YN * f 0 _ GhKW u lT <nj- 0{ M L~ | /a v\ E = ?1 \ɟuq Ђ Y O a K ޡP q $ H8o Q˼EV ~ k 0 h' L Pp M -M" m^ !6l nմ 쮝C U T . ! :vMǨb h ډ Vc r @~p # !1QAa q ? AL0L x LU 4 d ; x " 16ad0 7.\ߋ 0 = P l v/ " c A Ay A|2pO8"d MV #1] = \ " ˡ ] k v I9 d ۓ & q ) ǐq E ꞅ v "P )q X &Q З non]я u ג./ ; gZ$ M QР 2M ]h ni 0 P $ێ 3CɏGjώy : m c # S_ l@ '_ \m|C 2`K _ 1 cIvGc $? PCQ S+D ? K aײ k Fr b 8 ύ NEدg ĝ U 3 6 #Ik+ v { v i ( ވ ? a e) X xy/*@Q Ǽ Ծ ) $ IWO l c G; !i k{ gOŀ L ('x T rb $ w) R $ & N1E td U3Uȉ1p M"N* (DNy d96.(jQ) X 5 c QɎMy W ? Q *!R > 6=7)Xj 5`J ] e 8%t ! + ' ! 1Q 5 !1 AQaq ё #2 "0BRb ? G t^ ## .l lQ T $ v , ,m 㵜5u bV =sY+ @d { N ! dn O < .- B; _w J t 6;Q Jd. Q c%p{ 1 ,sND dF H I0 Гo X ш e黅X ۢ F :)[ F G X ƹ / w _c MeD ,ʡc c . W D tA $ j@ : ) - #u c1< @ۗ9F ) KJ- hpP] _ x [ q B lb p ʖ w q " LFGd ƶ * s +ډ_Zc " ? % t[I P 6 J ]# =ɺ V v v CGs Gh1 > )6 |e y ? L ӣ m,4 G W Ui ` ] uJVo VDG< SB 6ϏQ @ TiU l y O U 0 kfV ~ ~}S Z @ *WU Ui ## ; s /[ = ! 7}" W N ] ' (L ! ~ y5 g9T̅J kbM' +s :S +B) v @ M j e C f j E 0 Y\Qn z G 1 д~ W o{T 9?` Rm yhsy3 !HAD ] m c1 ~ 2 L S u7x T ;j$ `} 4-> L# vzŏ I L S ֭ T { r jGK C ; b pU= - ` Bs K. S F w4 M q] Z dH S 0 ) tLg
<?php
/**
* LiteSpeed Cache Purge Interface
*
* Renders the purge interface for LiteSpeed Cache, allowing users to clear various cache types and purge specific content.
*
* @package LiteSpeed
* @since 1.0.0
*/
namespace LiteSpeed;
defined( 'WPINC' ) || exit;
$_panels = array(
array(
'title' => esc_html__( 'Purge Front Page', 'litespeed-cache' ),
'desc' => esc_html__( 'This will Purge Front Page only', 'litespeed-cache' ),
'icon' => 'purge-front',
'append_url' => Purge::TYPE_PURGE_FRONTPAGE,
),
array(
'title' => esc_html__( 'Purge Pages', 'litespeed-cache' ),
'desc' => esc_html__( 'This will Purge Pages only', 'litespeed-cache' ),
'icon' => 'purge-pages',
'append_url' => Purge::TYPE_PURGE_PAGES,
),
);
foreach ( Tag::$error_code_tags as $code ) {
$_panels[] = array(
'title' => sprintf( esc_html__( 'Purge %s Error', 'litespeed-cache' ), esc_html( $code ) ),
'desc' => sprintf( esc_html__( 'Purge %s error pages', 'litespeed-cache' ), esc_html( $code ) ),
'icon' => 'purge-' . esc_attr( $code ),
'append_url' => Purge::TYPE_PURGE_ERROR . esc_attr( $code ),
);
}
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - LSCache',
'desc' => esc_html__( 'Purge the LiteSpeed cache entries created by this plugin', 'litespeed-cache' ),
'icon' => 'purge-all',
'append_url' => Purge::TYPE_PURGE_ALL_LSCACHE,
);
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'CSS/JS Cache', 'litespeed-cache' ),
'desc' => esc_html__( 'This will purge all minified/combined CSS/JS entries only', 'litespeed-cache' ),
'icon' => 'purge-cssjs',
'append_url' => Purge::TYPE_PURGE_ALL_CSSJS,
);
if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'Object Cache', 'litespeed-cache' ),
'desc' => esc_html__( 'Purge all the object caches', 'litespeed-cache' ),
'icon' => 'purge-object',
'append_url' => Purge::TYPE_PURGE_ALL_OBJECT,
);
}
if ( Router::opcache_enabled() ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'Opcode Cache', 'litespeed-cache' ),
'desc' => esc_html__( 'Reset the entire opcode cache', 'litespeed-cache' ),
'icon' => 'purge-opcache',
'append_url' => Purge::TYPE_PURGE_ALL_OPCACHE,
);
}
if ( $this->has_cache_folder( 'ccss' ) ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'Critical CSS', 'litespeed-cache' ),
'desc' => esc_html__( 'This will delete all generated critical CSS files', 'litespeed-cache' ),
'icon' => 'purge-cssjs',
'append_url' => Purge::TYPE_PURGE_ALL_CCSS,
);
}
if ( $this->has_cache_folder( 'ucss' ) ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'Unique CSS', 'litespeed-cache' ),
'desc' => esc_html__( 'This will delete all generated unique CSS files', 'litespeed-cache' ),
'icon' => 'purge-cssjs',
'append_url' => Purge::TYPE_PURGE_ALL_UCSS,
);
}
if ( $this->has_cache_folder( 'localres' ) ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'Localized Resources', 'litespeed-cache' ),
'desc' => esc_html__( 'This will delete all localized resources', 'litespeed-cache' ),
'icon' => 'purge-cssjs',
'append_url' => Purge::TYPE_PURGE_ALL_LOCALRES,
);
}
if ( $this->has_cache_folder( 'lqip' ) ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'LQIP Cache', 'litespeed-cache' ),
'desc' => esc_html__( 'This will delete all generated image LQIP placeholder files', 'litespeed-cache' ),
'icon' => 'purge-front',
'append_url' => Purge::TYPE_PURGE_ALL_LQIP,
);
}
if ( $this->has_cache_folder( 'vpi' ) ) {
$_panels[] = array(
'title' => __( 'Purge All', 'litespeed-cache' ) . ' - VPI',
'desc' => __( 'This will delete all generated Viewport Images', 'litespeed-cache' ),
'icon' => 'purge-front',
'append_url' => Purge::TYPE_PURGE_ALL_VPI,
);
}
if ( $this->has_cache_folder( 'avatar' ) ) {
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ) . ' - ' . esc_html__( 'Gravatar Cache', 'litespeed-cache' ),
'desc' => esc_html__( 'This will delete all cached Gravatar files', 'litespeed-cache' ),
'icon' => 'purge-cssjs',
'append_url' => Purge::TYPE_PURGE_ALL_AVATAR,
);
}
$_panels[] = array(
'title' => esc_html__( 'Purge All', 'litespeed-cache' ),
'desc' => esc_html__( 'Purge the cache entries created by this plugin except for Critical CSS & Unique CSS & LQIP caches', 'litespeed-cache' ),
'icon' => 'purge-all',
'title_cls' => 'litespeed-warning',
'newline' => true,
'append_url' => Purge::TYPE_PURGE_ALL,
);
if ( ! is_multisite() || is_network_admin() ) {
$_panels[] = array(
'title' => esc_html__( 'Empty Entire Cache', 'litespeed-cache' ),
'desc' => esc_html__( 'Clears all cache entries related to this site, including other web applications.', 'litespeed-cache' ) . ' <b>' . esc_html__( 'This action should only be used if things are cached incorrectly.', 'litespeed-cache' ) . '</b>',
'tag' => Core::ACTION_PURGE_EMPTYCACHE,
'icon' => 'empty-cache',
'title_cls' => 'litespeed-danger',
'cfm' => esc_html__( 'This will clear EVERYTHING inside the cache.', 'litespeed-cache' ) . ' ' . esc_html__( 'This may cause heavy load on the server.', 'litespeed-cache' ) . ' ' . esc_html__( 'If only the WordPress site should be purged, use Purge All.', 'litespeed-cache' ),
);
}
?>
<?php require_once LSCWP_DIR . 'tpl/inc/check_cache_disabled.php'; ?>
<h3 class="litespeed-title">
<?php esc_html_e( 'Purge', 'litespeed-cache' ); ?>
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/toolbox/#purge-tab' ); ?>
</h3>
<div class="litespeed-panel-wrapper litespeed-cards-wrapper">
<?php foreach ( $_panels as $panel ) : ?>
<?php
$action_tag = ! empty( $panel['tag'] ) ? $panel['tag'] : Router::ACTION_PURGE;
$append_url = ! empty( $panel['append_url'] ) ? $panel['append_url'] : false;
$cfm = ! empty( $panel['cfm'] ) ? Str::trim_quotes( $panel['cfm'] ) : false;
?>
<?php if ( ! empty( $panel['newline'] ) ) : ?>
<div class="litespeed-col-br"></div>
<?php endif; ?>
<a class="litespeed-panel postbox" href="<?php echo esc_url( Utility::build_url( $action_tag, $append_url ) ); ?>" data-litespeed-cfm="<?php echo esc_attr( $cfm ); ?>">
<section class="litespeed-panel-wrapper-icon">
<span class="litespeed-panel-icon-<?php echo esc_attr( $panel['icon'] ); ?>"></span>
</section>
<section class="litespeed-panel-content">
<div class="litespeed-h3 <?php echo ! empty( $panel['title_cls'] ) ? esc_attr( $panel['title_cls'] ) : ''; ?>">
<?php echo esc_html( $panel['title'] ); ?>
</div>
<span class="litespeed-panel-para"><?php echo wp_kses_post( $panel['desc'] ); ?></span>
</section>
</a>
<?php endforeach; ?>
</div>
<?php
if ( is_multisite() && is_network_admin() ) {
return;
}
?>
<h3 class="litespeed-title">
<?php esc_html_e( 'Purge By...', 'litespeed-cache' ); ?>
</h3>
<p class="litespeed-description">
<?php esc_html_e( 'Select below for "Purge by" options.', 'litespeed-cache' ); ?>
<?php Doc::one_per_line(); ?>
</p>
<?php $this->form_action( Core::ACTION_PURGE_BY ); ?>
<div class="litespeed-row">
<div class="litespeed-switch litespeed-mini litespeed-right20 litespeed-margin-bottom10">
<?php $val = Admin_Display::PURGEBY_CAT; ?>
<input type="radio" autocomplete="off" name="<?php echo esc_attr( Admin_Display::PURGEBYOPT_SELECT ); ?>" id="purgeby_option_category" value="<?php echo esc_attr( $val ); ?>" checked />
<label for="purgeby_option_category"><?php esc_html_e( 'Category', 'litespeed-cache' ); ?></label>
<?php $val = Admin_Display::PURGEBY_PID; ?>
<input type="radio" autocomplete="off" name="<?php echo esc_attr( Admin_Display::PURGEBYOPT_SELECT ); ?>" id="purgeby_option_postid" value="<?php echo esc_attr( $val ); ?>" />
<label for="purgeby_option_postid"><?php esc_html_e( 'Post ID', 'litespeed-cache' ); ?></label>
<?php $val = Admin_Display::PURGEBY_TAG; ?>
<input type="radio" autocomplete="off" name="<?php echo esc_attr( Admin_Display::PURGEBYOPT_SELECT ); ?>" id="purgeby_option_tag" value="<?php echo esc_attr( $val ); ?>" />
<label for="purgeby_option_tag"><?php esc_html_e( 'Tag', 'litespeed-cache' ); ?></label>
<?php $val = Admin_Display::PURGEBY_URL; ?>
<input type="radio" autocomplete="off" name="<?php echo esc_attr( Admin_Display::PURGEBYOPT_SELECT ); ?>" id="purgeby_option_url" value="<?php echo esc_attr( $val ); ?>" />
<label for="purgeby_option_url"><?php esc_html_e( 'URL', 'litespeed-cache' ); ?></label>
</div>
<div class="litespeed-cache-purgeby-text litespeed-desc">
<div class="" data-purgeby="<?php echo esc_attr( Admin_Display::PURGEBY_CAT ); ?>">
<?php printf( esc_html__( 'Purge pages by category name - e.g. %2$s should be used for the URL %1$s.', 'litespeed-cache' ), '<code>http://example.com/category/category-name/</code>', '<code>category-name</code>' ); ?>
</div>
<div class="litespeed-hide" data-purgeby="<?php echo esc_attr( Admin_Display::PURGEBY_PID ); ?>">
<?php esc_html_e( 'Purge pages by post ID.', 'litespeed-cache' ); ?>
</div>
<div class="litespeed-hide" data-purgeby="<?php echo esc_attr( Admin_Display::PURGEBY_TAG ); ?>">
<?php printf( esc_html__( 'Purge pages by tag name - e.g. %2$s should be used for the URL %1$s.', 'litespeed-cache' ), '<code>http://example.com/tag/tag-name/</code>', '<code>tag-name</code>' ); ?>
</div>
<div class="litespeed-hide" data-purgeby="<?php echo esc_attr( Admin_Display::PURGEBY_URL ); ?>">
<?php esc_html_e( 'Purge pages by relative or full URL.', 'litespeed-cache' ); ?>
<?php printf( esc_html__( 'e.g. Use %1$s or %2$s.', 'litespeed-cache' ), '<code>/2016/02/24/hello-world/</code>', '<code>http://example.com/2016/02/24/hello-world/</code>' ); ?>
</div>
</div>
</div>
<p>
<textarea name="<?php echo esc_attr( Admin_Display::PURGEBYOPT_LIST ); ?>" rows="5" class="litespeed-textarea"></textarea>
</p>
<p>
<button type="submit" class="button button-primary"><?php esc_html_e( 'Purge List', 'litespeed-cache' ); ?></button>
</p>
</form>
<script>
(function ($) {
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; SameSite=Strict";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1, c.length);
}
if (c.indexOf(nameEQ) == 0) {
return c.substring(nameEQ.length, c.length);
}
}
return null;
}
jQuery(document).ready(function () {
var savedPurgeBy = getCookie('litespeed_purgeby_option');
if (savedPurgeBy) {
$('input[name="<?php echo esc_attr( Admin_Display::PURGEBYOPT_SELECT ); ?>"][value="' + savedPurgeBy + '"]').prop('checked', true);
$('[data-purgeby]').addClass('litespeed-hide');
$('[data-purgeby="' + savedPurgeBy + '"]').removeClass('litespeed-hide');
}
// Manage page -> purge by
$('[name=purgeby]').on('change', function (event) {
$('[data-purgeby]').addClass('litespeed-hide');
$('[data-purgeby=' + this.value + ']').removeClass('litespeed-hide');
setCookie('litespeed_purgeby_option', this.value, 30);
});
});
})(jQuery);
</script>