D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
everqlsh
/
www
/
wp-admin
/
user
/
577040
/
Filename :
tpl.zip
back
Copy
PK ��}\�5��U� U� dash/dashboard.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $health_scores = Health::cls()->scores(); $crawler_summary = Crawler::get_summary(); // Image related info $img_optm_summary = Img_Optm::get_summary(); $img_count = Img_Optm::cls()->img_count(); $img_finished_percentage = 0; if ($img_count['groups_all']) $img_finished_percentage = 100 - floor($img_count['groups_new'] * 100 / $img_count['groups_all']); if ($img_finished_percentage == 100 && $img_count['groups_new']) { $img_finished_percentage = 99; } $__cloud = Cloud::cls(); $__cloud->finish_qc_activation(); $cloud_summary = Cloud::get_summary(); $css_summary = CSS::get_summary(); $ucss_summary = UCSS::get_summary(); $placeholder_summary = Placeholder::get_summary(); $vpi_summary = VPI::get_summary(); $ccss_count = count($this->load_queue('ccss')); $ucss_count = count($this->load_queue('ucss')); $placeholder_queue_count = count($this->load_queue('lqip')); $vpi_queue_count = count($this->load_queue('vpi')); $can_page_load_time = defined('LITESPEED_SERVER_TYPE') && LITESPEED_SERVER_TYPE !== 'NONE'; ?> <div class="litespeed-dashboard"> <?php if (!$__cloud->activated() && !Admin_Display::has_qc_hide_banner()) : ?> <div class="litespeed-dashboard-group"> <div class="litespeed-flex-container"> <div class="postbox litespeed-postbox litespeed-postbox-cache"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Cache Status', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-cache'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <?php $cache_list = array( Base::O_CACHE => __('Public Cache', 'litespeed-cache'), Base::O_CACHE_PRIV => __('Private Cache', 'litespeed-cache'), Base::O_OBJECT => __('Object Cache', 'litespeed-cache'), Base::O_CACHE_BROWSER => __('Browser Cache', 'litespeed-cache'), ); foreach ($cache_list as $id => $title) : ?> <p> <?php if ($this->conf($id)) : ?> <span class="litespeed-label-success litespeed-label-dashboard">ON</span> <?php else : ?> <span class="litespeed-label-danger litespeed-label-dashboard">OFF</span> <?php endif; ?> <?php echo esc_html($title); ?> </p> <?php endforeach; ?> </div> </div> <div class="postbox litespeed-postbox litespeed-postbox-crawler"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Crawler Status', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-crawler'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <p> <code><?php echo count(Crawler::cls()->list_crawlers()); ?></code> <?php echo __('Crawler(s)', 'litespeed-cache'); ?> </p> <p> <?php echo __('Currently active crawler', 'litespeed-cache'); ?>: <code><?php echo esc_html($crawler_summary['curr_crawler']); ?></code> </p> <?php if ($crawler_summary['curr_crawler_beginning_time']) : ?> <p> <b><?php echo __('Current crawler started at', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($crawler_summary['curr_crawler_beginning_time']); ?> </p> <?php endif; ?> <?php if ($crawler_summary['last_start_time']) : ?> <p class='litespeed-desc'> <b><?php echo __('Last interval', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($crawler_summary['last_start_time']); ?> </p> <?php endif; ?> <?php if ($crawler_summary['end_reason']) : ?> <p class='litespeed-desc'> <b><?php echo __('Ended reason', 'litespeed-cache'); ?>:</b> <?php echo esc_html($crawler_summary['end_reason']); ?> </p> <?php endif; ?> <?php if ($crawler_summary['last_crawled']) : ?> <p class='litespeed-desc'> <?php echo sprintf(__('<b>Last crawled:</b> %d item(s)', 'litespeed-cache'), $crawler_summary['last_crawled']); ?> </p> <?php endif; ?> </div> </div> <?php $news = $__cloud->load_qc_status_for_dash('news_dash_guest'); ?> <?php if ($news) : ?> <div class="postbox litespeed-postbox"> <div class="inside litespeed-text-center"> <h3 class="litespeed-title"> <?php echo __('News', 'litespeed-cache'); ?> </h3> <div class="litespeed-top20"> <?php echo $news; ?> </div> </div> </div> <?php endif; ?> </div> </div> <?php endif; ?> <div class="litespeed-dashboard-qc"> <?php if (!$__cloud->activated() && !Admin_Display::has_qc_hide_banner()) : ?> <div class="litespeed-dashboard-unlock"> <div> <h3 class="litespeed-dashboard-unlock-title"> <strong class="litespeed-qc-text-gradient"> <?php _e('Accelerate, Optimize, Protect', 'litespeed-cache'); ?> </strong> </h3> <p class="litespeed-dashboard-unlock-desc"><?php _e('Speed up your WordPress site even further with <strong>QUIC.cloud Online Services and CDN</strong>.', 'litespeed-cache'); ?></p> <p> <?php _e('Free monthly quota available. Can also be used anonymously (no email required).', 'litespeed-cache'); ?> </p> <p> <a class="button button-primary" href="<?php echo Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_ACTIVATE); ?>"> <span class="dashicons dashicons-yes"></span> <?php _e('Enable QUIC.cloud services', 'litespeed-cache'); ?> </a> <br><a class="button button-link litespeed-top10" href="<?php echo Utility::build_url(Router::ACTION_ADMIN_DISPLAY, Admin_Display::TYPE_QC_HIDE_BANNER); ?>"><?php _e('Do not show this again', 'litespeed-cache'); ?></a> </p> <p class="litespeed-dashboard-unlock-footer"> <?php _e('QUIC.cloud provides CDN and online optimization services, and is not required. You may use many features of this plugin without QUIC.cloud.', 'litespeed-cache'); ?><br> <a href="https://www.quic.cloud/" target="_blank"> <?php _e('Learn More about QUIC.cloud', 'litespeed-cache'); ?> </a> <br> </p> </div> </div> <?php endif; ?> <div class="litespeed-dashboard-qc-enable"> <div class="litespeed-dashboard-header"> <h3 class="litespeed-dashboard-title litespeed-dashboard-title--w-btn"> <span class="litespeed-right10"><?php echo __('QUIC.cloud Service Usage Statistics', 'litespeed-cache'); ?></span> <a href="<?php echo Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_SYNC_USAGE); ?>" class="button button-secondary button-small"> <span class="dashicons dashicons-update"></span> <?php echo __('Refresh Usage', 'litespeed-cache'); ?> <span class="screen-reader-text"><?php echo __('Sync data from Cloud', 'litespeed-cache'); ?></span> </a> </h3> <hr> <a href="https://docs.litespeedtech.com/lscache/lscwp/dashboard/#usage-statistics" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache'); ?></a> </div> <?php if (!$__cloud->activated() && Admin_Display::has_qc_hide_banner()) : ?> <p class="litespeed-desc litespeed-margin-top-remove"><?php echo __('The features below are provided by', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-general'); ?>">QUIC.cloud</a></p> <?php endif; ?> <div class="litespeed-dashboard-stats-wrapper"> <?php $cat_list = array( 'img_optm' => __('Image Optimization', 'litespeed-cache'), 'page_optm' => __('Page Optimization', 'litespeed-cache'), 'cdn' => __('CDN Bandwidth', 'litespeed-cache'), 'lqip' => __('Low Quality Image Placeholder', 'litespeed-cache'), ); foreach ($cat_list as $svc => $title) : $finished_percentage = 0; $total_used = $used = $quota = $pag_used = $pag_total = '-'; $pag_width = 0; $percentage_bg = 'success'; $pag_txt_color = ''; $usage = false; if (!empty($cloud_summary['usage.' . $svc])) { $usage = $cloud_summary['usage.' . $svc]; $finished_percentage = floor($usage['used'] * 100 / $usage['quota']); $used = (int)$usage['used']; $quota = (int)$usage['quota']; $pag_used = !empty($usage['pag_used']) ? (int)$usage['pag_used'] : 0; $pag_bal = !empty($usage['pag_bal']) ? (int)$usage['pag_bal'] : 0; $pag_total = $pag_used + $pag_bal; if (!empty($usage['total_used'])) { $total_used = (int)$usage['total_used']; } if ($pag_total) { // $finished_percentage = floor( ($pag_used+$usage[ 'used' ]) * 100 / ($usage[ 'quota' ]+$pag_total) ); $pag_width = round($pag_used / $pag_total * 100) . '%'; } if ($finished_percentage > 85) { $percentage_bg = 'warning'; if ($finished_percentage > 95) { $percentage_bg = 'danger'; if ($pag_bal) { // is using PAG quota $percentage_bg = 'warning'; $pag_txt_color = 'litespeed-success'; } } } if ($svc == 'cdn') { // $used = Utility::real_size( $used * 1000000 * 100, true ); // $quota = Utility::real_size( $quota * 1000000 * 100, true ); // $pag_used = Utility::real_size( $pag_used * 1000000 * 100, true ); // $pag_bal = Utility::real_size( $pag_bal * 1000000 * 100, true ); } } ?> <div class="postbox litespeed-postbox"> <div class="inside"> <h3 class="litespeed-title"><?php echo $title; ?></h3> <div class="litespeed-flex-container"> <div class="litespeed-icon-vertical-middle litespeed-pie-<?php echo $percentage_bg; ?>"> <?php echo GUI::pie($finished_percentage, 60, false); ?> </div> <div> <div class="litespeed-dashboard-stats"> <h3><?php echo ($svc == 'img_optm' ? __('Fast Queue Usage', 'litespeed-cache') : __('Usage', 'litespeed-cache')); ?></h3> <p> <strong><?php echo $used; ?></strong> <?php if ($used != $quota) { ?> <span class="litespeed-desc"> of <?php echo $quota; ?></span> <?php } ?> </p> </div> </div> </div> <?php if ($pag_total > 0) { ?> <p class="litespeed-dashboard-stats-payg <?php echo $pag_txt_color; ?>"> <?php echo __('PAYG Balance', 'litespeed-cache'); ?>: <strong><?php echo $pag_bal; ?></strong> <button class="litespeed-info-button" data-balloon-pos="up" aria-label="<?php echo __('PAYG used this month', 'litespeed-cache'); ?>: <?php echo $pag_used; ?>. <?php echo __('PAYG balance and usage not included in above quota calculation.', 'litespeed-cache'); ?>"> <span class="dashicons dashicons-info"></span> <span class="screen-reader-text"><?php echo __('Pay as You Go Usage Statistics', 'litespeed-cache'); ?></span> </button> </p> <?php } ?> <?php if ($svc == 'page_optm') : ?> <?php if (!empty($usage['sub_svc'])) : ?> <p class="litespeed-dashboard-stats-total"> <?php $i = 0; foreach ($usage['sub_svc'] as $sub_svc => $sub_usage) : ?> <span class="<?php if ($i++ > 0) echo 'litespeed-left10'; ?>"><?php echo strtoupper(esc_html($sub_svc)); ?>: <strong><?php echo (int)$sub_usage; ?></strong></span> <?php endforeach; ?> </p> <?php endif; ?> <?php endif; ?> <?php if ($svc == 'img_optm') { ?> <p class="litespeed-dashboard-stats-total"> <?php echo __('Total Usage', 'litespeed-cache'); ?>: <strong><?php echo $total_used; ?> / ∞</strong> <button class="litespeed-info-button" data-balloon-pos="up" aria-label="<?php echo __('Total images optimized in this month', 'litespeed-cache'); ?>"> <span class="dashicons dashicons-info"></span> </button> </p> <div class="clear"></div> <?php } ?> <?php if (isset($usage['remaining_daily_quota']) && $usage['remaining_daily_quota'] >= 0 && isset($usage['daily_quota']) && $usage['daily_quota'] >= 0) { ?> <p class="litespeed-dashboard-stats-total"> <?php echo __('Remaining Daily Quota', 'litespeed-cache'); ?>: <strong><?php echo $usage['remaining_daily_quota']; ?> / <?php echo $usage['daily_quota']; ?></strong> </p> <div class="clear"></div> <?php } ?> </div> </div> <?php endforeach; ?> <?php if (!empty($cloud_summary['partner'])) : ?> <div class="litespeed-postbox litespeed-postbox-partner"> <div class="inside"> <h3 class="litespeed-title"><?php echo __('Partner Benefits Provided by', 'litespeed-cache'); ?></h3> <div> <?php if (!empty($cloud_summary['partner']['logo'])) : ?> <?php if (!empty($cloud_summary['partner']['url'])) : ?> <a href="<?php echo $cloud_summary['partner']['url']; ?>" target="_blank"><img src="<?php echo $cloud_summary['partner']['logo']; ?>" alt="<?php echo $cloud_summary['partner']['name']; ?>"></a> <?php else : ?> <img src="<?php echo $cloud_summary['partner']['logo']; ?>" alt="<?php echo $cloud_summary['partner']['name']; ?>"> <?php endif; ?> <?php elseif (!empty($cloud_summary['partner']['name'])) : ?> <?php if (!empty($cloud_summary['partner']['url'])) : ?> <a href="<?php echo $cloud_summary['partner']['url']; ?>" target="_blank"><span class="postbox-partner-name"><?php echo $cloud_summary['partner']['name']; ?></span></a> <?php else : ?> <span class="postbox-partner-name"><?php echo $cloud_summary['partner']['name']; ?></span> <?php endif; ?> <?php endif; ?> </div> </div> </div> <?php endif; ?> </div> <p class="litespeed-right litespeed-qc-dashboard-link"> <?php if (!empty($cloud_summary['partner']) && !empty($cloud_summary['partner']['login_title']) && !empty($cloud_summary['partner']['login_link'])) : ?> <?php Doc::learn_more($cloud_summary['partner']['login_link'], $cloud_summary['partner']['login_title'], true, 'button litespeed-btn-warning'); ?> <?php elseif (!empty($cloud_summary['partner']) && !empty($cloud_summary['partner']['disable_qc_login'])) : ?> <?php else : ?> <?php if (!$__cloud->activated()) : ?> <?php Doc::learn_more( Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_ACTIVATE), __('Enable QUIC.cloud Services', 'litespeed-cache'), true, 'button litespeed-btn-warning' ); ?> <?php elseif (!empty($cloud_summary['qc_activated']) && $cloud_summary['qc_activated'] != 'anonymous') : ?> <a href="<?php echo $__cloud->qc_link(); ?>" class="litespeed-link-with-icon" target="qc"><?php echo __('Go to QUIC.cloud dashboard', 'litespeed-cache'); ?> <span class="dashicons dashicons-external"></span></a> <?php else : ?> <?php Doc::learn_more( Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_LINK), __('Link to QUIC.cloud', 'litespeed-cache'), true, 'button litespeed-btn-warning' ); ?> <?php endif; ?> <?php endif; ?> </p> <div class="litespeed-dashboard-group"> <hr> <div class="litespeed-flex-container"> <div class="postbox litespeed-postbox litespeed-postbox-pagetime"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Page Load Time', 'litespeed-cache'); ?> <?php if ($can_page_load_time) : ?> <?php $closest_server = Cloud::get_summary('server.' . CLoud::SVC_HEALTH); ?> <?php if ($closest_server) : ?> <a href="<?php echo Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_REDETECT_CLOUD, false, null, array('svc' => Cloud::SVC_HEALTH)); ?>" data-balloon-pos="up" data-balloon-break aria-label='<?php echo sprintf(__('Current closest Cloud server is %s. Click to redetect.', 'litespeed-cache'), $closest_server); ?>' data-litespeed-cfm="<?php echo __('Are you sure you want to redetect the closest cloud server for this service?', 'litespeed-cache'); ?>" class="litespeed-title-right-icon"><i class='litespeed-quic-icon'></i> <small><?php echo __('Redetect', 'litespeed-cache'); ?></small></a> <?php endif; ?> <?php endif; ?> </h3> <div> <div class="litespeed-flex-container"> <?php if ($can_page_load_time) : ?> <?php if ($health_scores['speed_before']) : ?> <div class="litespeed-score-col"> <p class="litespeed-text-grey"> <?php echo __('Before', 'litespeed-cache'); ?> </p> <div class="litespeed-text-md litespeed-text-grey"> <?php echo $health_scores['speed_before']; ?><span class="litespeed-text-large">s</span> </div> </div> <div class="litespeed-score-col"> <p class="litespeed-text-grey"> <?php echo __('After', 'litespeed-cache'); ?> </p> <div class="litespeed-text-md litespeed-text-success"> <?php echo $health_scores['speed_after']; ?><span class="litespeed-text-large">s</span> </div> </div> <div class="litespeed-score-col litespeed-score-col--imp"> <p class="litespeed-text-grey" style="white-space: nowrap;"> <?php echo __('Improved by', 'litespeed-cache'); ?> </p> <div class="litespeed-text-jumbo litespeed-text-success"> <?php echo $health_scores['speed_improved']; ?><span class="litespeed-text-large">%</span> </div> </div> <?php endif; ?> <?php else : ?> <div> <p><?php _e('You must be using one of the following products in order to measure Page Load Time:', 'litespeed-cache'); ?></p> <a href="https://www.litespeedtech.com/products/litespeed-web-server" target="_blank">LiteSpeed Web Server</a> <br /> <a href="https://openlitespeed.org/" target="_blank">OpenLiteSpeed Web Server</a> <br /> <a href="https://www.litespeedtech.com/products/litespeed-web-adc" target="_blank">LiteSpeed Web ADC</a> <br /> <a href="https://quic.cloud" target="_blank">QUIC.cloud CDN</a> </div> <?php endif; ?> </div> </div> </div> <?php if ($can_page_load_time) : ?> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <?php if (!empty($cloud_summary['last_request.health-speed'])) : ?> <span class="litespeed-right10"> <?php echo __('Last requested', 'litespeed-cache') . ': <span data-balloon-pos="up" aria-label="' . Utility::readable_time($cloud_summary['last_request.health-speed']) . '">' . sprintf(__(' %s ago', 'litespeed-cache'), human_time_diff($cloud_summary['last_request.health-speed'])) . '</span>'; ?> </span> <?php endif; ?> <a href="<?php echo Utility::build_url(Router::ACTION_HEALTH, Health::TYPE_SPEED); ?>" class="button button-secondary button-small"> <span class="dashicons dashicons-update"></span> <?php echo __('Refresh', 'litespeed-cache'); ?> <span class="screen-reader-text"><?php echo __('Refresh page load time', 'litespeed-cache'); ?></span> </a> </div> <?php endif; ?> </div> <div class="postbox litespeed-postbox litespeed-postbox-pagespeed"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('PageSpeed Score', 'litespeed-cache'); ?> <?php $id = Base::O_GUEST; ?> <a href="<?php echo admin_url('admin.php?page=litespeed-general'); ?>" class="litespeed-title-right-icon"><?php echo Lang::title($id); ?></a> <?php if ($this->conf($id)) : ?> <span class="litespeed-label-success litespeed-label-dashboard">ON</span> <?php else : ?> <span class="litespeed-label-danger litespeed-label-dashboard">OFF</span> <?php endif; ?> </h3> <div> <div class="litespeed-margin-bottom20"> <div class="litespeed-row-flex" style="margin-left: -10px;"> <?php if (!empty($health_scores['score_before'])) : ?> <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5"> <p class="litespeed-text-grey litespeed-text-center"> <?php echo __('Before', 'litespeed-cache'); ?> </p> <div class="litespeed-promo-score"> <?php echo GUI::pie($health_scores['score_before'], 45, false, true, 'litespeed-pie-' . GUI::cls()->get_cls_of_pagescore($health_scores['score_before'])); ?> </div> </div> <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5"> <p class="litespeed-text-grey litespeed-text-center"> <?php echo __('After', 'litespeed-cache'); ?> </p> <div class="litespeed-promo-score"> <?php echo GUI::pie($health_scores['score_after'], 45, false, true, 'litespeed-pie-' . GUI::cls()->get_cls_of_pagescore($health_scores['score_after'])); ?> </div> </div> <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5"> <p class="litespeed-text-grey" style="white-space: nowrap;"> <?php echo __('Improved by', 'litespeed-cache'); ?> </p> <div class="litespeed-postbox-score-improve litespeed-text-fern"> <?php echo $health_scores['score_improved']; ?><span class="litespeed-text-large">%</span> </div> </div> <?php endif; ?> </div> </div> </div> </div> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <?php if (!empty($cloud_summary['last_request.health-score'])) : ?> <span class="litespeed-right10"> <?php echo __('Last requested', 'litespeed-cache') . ': <span data-balloon-pos="up" aria-label="' . Utility::readable_time($cloud_summary['last_request.health-score']) . '">' . sprintf(__(' %s ago', 'litespeed-cache'), human_time_diff($cloud_summary['last_request.health-score'])) . '</span>'; ?> </span> <?php endif; ?> <a href="<?php echo Utility::build_url(Router::ACTION_HEALTH, Health::TYPE_SCORE); ?>" class="button button-secondary button-small"> <span class="dashicons dashicons-update"></span> <?php echo __('Refresh', 'litespeed-cache'); ?> <span class="screen-reader-text"><?php echo __('Refresh page score', 'litespeed-cache'); ?></span> </a> </div> </div> <div class="postbox litespeed-postbox litespeed-postbox-double litespeed-postbox-imgopt"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Image Optimization Summary', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-img_optm'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <div class="litespeed-postbox-double-content"> <div class="litespeed-postbox-double-col"> <div class="litespeed-flex-container"> <div class="litespeed-icon-vertical-middle"> <?php echo GUI::pie($img_finished_percentage, 70, true); ?> </div> <div> <div class="litespeed-dashboard-stats"> <a data-litespeed-onlyonce class="button button-primary" <?php if (!empty($img_count['groups_new']) || !empty($img_count['groups.' . Img_Optm::STATUS_RAW])) : ?> href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_NEW_REQ); ?>" <?php else : ?> href='javascript:;' disabled <?php endif; ?>> <span class="dashicons dashicons-images-alt2"></span> <?php echo __('Send Optimization Request', 'litespeed-cache'); ?> </a> </div> </div> </div> <p> <?php echo __('Total Reduction', 'litespeed-cache'); ?>: <code><?php echo isset($img_optm_summary['reduced']) ? Utility::real_size($img_optm_summary['reduced']) : '-'; ?></code> </p> <p> <?php echo __('Images Pulled', 'litespeed-cache'); ?>: <code><?php echo isset($img_optm_summary['img_taken']) ? $img_optm_summary['img_taken'] : '-'; ?></code> </p> </div> <div class="litespeed-postbox-double-col"> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_REQUESTED])) : ?> <p class="litespeed-success"> <?php echo __('Images requested', 'litespeed-cache'); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group.' . Img_Optm::STATUS_REQUESTED]); ?> (<?php echo Admin_Display::print_plural($img_count['img.' . Img_Optm::STATUS_REQUESTED], 'image'); ?>) </code> </p> <?php endif; ?> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_NOTIFIED])) : ?> <p class="litespeed-success"> <?php echo __('Images notified to pull', 'litespeed-cache'); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group.' . Img_Optm::STATUS_NOTIFIED]); ?> (<?php echo Admin_Display::print_plural($img_count['img.' . Img_Optm::STATUS_NOTIFIED], 'image'); ?>) </code> </p> <?php endif; ?> <p> <?php echo __('Last Request', 'litespeed-cache'); ?>: <code><?php echo !empty($img_optm_summary['last_requested']) ? Utility::readable_time($img_optm_summary['last_requested']) : '-'; ?></code> </p> <p> <?php echo __('Last Pull', 'litespeed-cache'); ?>: <code><?php echo !empty($img_optm_summary['last_pull']) ? Utility::readable_time($img_optm_summary['last_pull']) : '-'; ?></code> </p> <?php $cache_list = array( Base::O_IMG_OPTM_AUTO => Lang::title(Base::O_IMG_OPTM_AUTO), ); foreach ($cache_list as $id => $title) : ?> <p> <?php if ($this->conf($id)) : ?> <span class="litespeed-label-success litespeed-label-dashboard">ON</span> <?php else : ?> <span class="litespeed-label-danger litespeed-label-dashboard">OFF</span> <?php endif; ?> <a href="<?php echo admin_url('admin.php?page=litespeed-img_optm#settings'); ?>"><?php echo $title; ?></a> </p> <?php endforeach; ?> </div> </div> </div> </div> <div class="postbox litespeed-postbox litespeed-postbox-cache"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Cache Status', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-cache'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <?php $cache_list = array( Base::O_CACHE => __('Public Cache', 'litespeed-cache'), Base::O_CACHE_PRIV => __('Private Cache', 'litespeed-cache'), Base::O_OBJECT => __('Object Cache', 'litespeed-cache'), Base::O_CACHE_BROWSER => __('Browser Cache', 'litespeed-cache'), ); foreach ($cache_list as $id => $title) : ?> <p> <?php if ($this->conf($id)) : ?> <span class="litespeed-label-success litespeed-label-dashboard">ON</span> <?php else : ?> <span class="litespeed-label-danger litespeed-label-dashboard">OFF</span> <?php endif; ?> <?php echo esc_html($title); ?> </p> <?php endforeach; ?> </div> </div> <div class="postbox litespeed-postbox litespeed-postbox-ccss"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Critical CSS', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-page_optm#settings_css'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <?php if (!empty($css_summary['last_request_ccss'])) : ?> <p> <?php echo __('Last generated', 'litespeed-cache') . ': <code>' . Utility::readable_time($css_summary['last_request_ccss']) . '</code>'; ?> </p> <p> <?php echo __('Time to execute previous request', 'litespeed-cache') . ': <code>' . esc_html($css_summary['last_spent_ccss']) . 's</code>'; ?> </p> <?php endif; ?> <p> <?php echo __('Requests in queue', 'litespeed-cache'); ?>: <code><?php echo $ccss_count ?: '-'; ?></code> <a href="<?php echo $ccss_count ? Utility::build_url(Router::ACTION_CSS, CSS::TYPE_GEN_CCSS) : 'javascript:;'; ?>" class="button button-secondary button-small <?php if (!$ccss_count) echo 'disabled'; ?>"> <?php echo __('Force cron', 'litespeed-cache'); ?> </a> </p> </div> <?php if (!empty($cloud_summary['last_request.ccss'])) : ?> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <?php echo __('Last requested', 'litespeed-cache') . ': ' . Utility::readable_time($cloud_summary['last_request.ccss']) ?> </div> <?php endif; ?> </div> <div class="postbox litespeed-postbox litespeed-postbox-ucss"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Unique CSS', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-page_optm#settings_css'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <?php if (!empty($ucss_summary['last_request'])) : ?> <p> <?php echo __('Last generated', 'litespeed-cache') . ': <code>' . Utility::readable_time($ucss_summary['last_request']) . '</code>'; ?> </p> <p> <?php echo __('Time to execute previous request', 'litespeed-cache') . ': <code>' . esc_html($ucss_summary['last_spent']) . 's</code>'; ?> </p> <?php endif; ?> <p> <?php echo __('Requests in queue', 'litespeed-cache'); ?>: <code><?php echo $ucss_count ?: '-' ?></code> <a href="<?php echo $ucss_count ? Utility::build_url(Router::ACTION_UCSS, UCSS::TYPE_GEN) : 'javascript:;'; ?>" class="button button-secondary button-small <?php if (!$ucss_count) echo 'disabled'; ?>"> <?php echo __('Force cron', 'litespeed-cache'); ?> </a> </p> </div> <?php if (!empty($cloud_summary['last_request.ucss'])) : ?> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <?php echo __('Last requested', 'litespeed-cache') . ': ' . Utility::readable_time($cloud_summary['last_request.ucss']) ?> </div> <?php endif; ?> </div> <div class="postbox litespeed-postbox litespeed-postbox-lqip"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Low Quality Image Placeholder', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-page_optm#settings_media'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <?php if (!empty($placeholder_summary['last_request'])) : ?> <p> <?php echo __('Last generated', 'litespeed-cache') . ': <code>' . Utility::readable_time($placeholder_summary['last_request']) . '</code>'; ?> </p> <p> <?php echo __('Time to execute previous request', 'litespeed-cache') . ': <code>' . esc_html($placeholder_summary['last_spent']) . 's</code>'; ?> </p> <?php endif; ?> <p> <?php echo __('Requests in queue', 'litespeed-cache'); ?>: <code><?php echo $placeholder_queue_count ?: '-' ?></code> <a href="<?php echo $placeholder_queue_count ? Utility::build_url(Router::ACTION_PLACEHOLDER, Placeholder::TYPE_GENERATE) : 'javascript:;'; ?>" class="button button-secondary button-small <?php if (!$placeholder_queue_count) echo 'disabled'; ?>"> <?php echo __('Force cron', 'litespeed-cache'); ?> </a> </p> </div> <?php if (!empty($cloud_summary['last_request.lqip'])) : ?> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <?php echo __('Last requested', 'litespeed-cache') . ': ' . Utility::readable_time($cloud_summary['last_request.lqip']) ?> </div> <?php endif; ?> </div> <div class="postbox litespeed-postbox litespeed-postbox-vpi"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Viewport Image', 'litespeed-cache'); ?> (VPI) <a href="<?php echo admin_url('admin.php?page=litespeed-page_optm#settings_vpi'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <?php if (!empty($vpi_summary['last_request'])) : ?> <p> <?php echo __('Last generated', 'litespeed-cache') . ': <code>' . Utility::readable_time($vpi_summary['last_request']) . '</code>'; ?> </p> <p> <?php echo __('Time to execute previous request', 'litespeed-cache') . ': <code>' . esc_html($vpi_summary['last_spent']) . 's</code>'; ?> </p> <?php endif; ?> <p> <?php echo __('Requests in queue', 'litespeed-cache'); ?>: <code><?php echo $vpi_queue_count ?: '-' ?></code> <a href="<?php echo $vpi_queue_count ? Utility::build_url(Router::ACTION_VPI, VPI::TYPE_GEN) : 'javascript:;'; ?>" class="button button-secondary button-small <?php if (!$vpi_queue_count) echo 'disabled'; ?>"> <?php echo __('Force cron', 'litespeed-cache'); ?> </a> </p> </div> <?php if (!empty($cloud_summary['last_request.vpi'])) : ?> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <?php echo __('Last requested', 'litespeed-cache') . ': ' . Utility::readable_time($cloud_summary['last_request.vpi']) ?> </div> <?php endif; ?> </div> <div class="postbox litespeed-postbox litespeed-postbox-crawler"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Crawler Status', 'litespeed-cache'); ?> <a href="<?php echo admin_url('admin.php?page=litespeed-crawler'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> </h3> <p> <code><?php echo count(Crawler::cls()->list_crawlers()); ?></code> <?php echo __('Crawler(s)', 'litespeed-cache'); ?> </p> <p> <?php echo __('Currently active crawler', 'litespeed-cache'); ?>: <code><?php echo esc_html($crawler_summary['curr_crawler']); ?></code> </p> <?php if ($crawler_summary['curr_crawler_beginning_time']) : ?> <p> <b><?php echo __('Current crawler started at', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($crawler_summary['curr_crawler_beginning_time']); ?> </p> <?php endif; ?> <?php if ($crawler_summary['last_start_time']) : ?> <p class='litespeed-desc'> <b><?php echo __('Last interval', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($crawler_summary['last_start_time']); ?> </p> <?php endif; ?> <?php if ($crawler_summary['end_reason']) : ?> <p class='litespeed-desc'> <b><?php echo __('Ended reason', 'litespeed-cache'); ?>:</b> <?php echo esc_html($crawler_summary['end_reason']); ?> </p> <?php endif; ?> <?php if ($crawler_summary['last_crawled']) : ?> <p class='litespeed-desc'> <?php echo sprintf(__('<b>Last crawled:</b> %d item(s)', 'litespeed-cache'), $crawler_summary['last_crawled']); ?> </p> <?php endif; ?> </div> </div> <div class="postbox litespeed-postbox litespeed-postbox-quiccloud<?php if (empty($cloud_summary['qc_activated']) || $cloud_summary['qc_activated'] != 'cdn') : ?> litespeed-postbox--quiccloud<?php endif; ?>"> <div class="inside"> <h3 class="litespeed-title litespeed-dashboard-title--w-btn"> <span class="litespeed-quic-icon"></span>QUIC.cloud CDN <?php if (empty($cloud_summary['qc_activated']) || $cloud_summary['qc_activated'] != 'cdn') : ?> <a href="https://www.quic.cloud/quic-cloud-services-and-features/litespeed-cache-service/" class="litespeed-title-right-icon" target="_blank"><?php echo __('Learn More', 'litespeed-cache'); ?></a> <?php else : ?> <a href="<?php echo admin_url('admin.php?page=litespeed-cdn'); ?>" class="litespeed-title-right-icon"><?php echo __('More', 'litespeed-cache'); ?></a> <?php endif; ?> </h3> <?php if (empty($cloud_summary['qc_activated']) || $cloud_summary['qc_activated'] != 'cdn') : ?> <div class="litespeed-text-center litespeed-empty-space-medium"> <p class="litespeed-margin-bottom20"> <?php Doc::learn_more( Utility::build_url(Router::ACTION_CLOUD, $__cloud->activated() ? Cloud::TYPE_ENABLE_CDN : Cloud::TYPE_ACTIVATE), '<span class="dashicons dashicons-saved"></span>' . __('Enable QUIC.cloud CDN', 'litespeed-cache'), true, 'button button-primary litespeed-button-cta' ); ?> </p> <p class="litespeed-margin-bottom10 litespeed-top20 litespeed-text-md"> <strong class="litespeed-qc-text-gradient"><?php echo __('Best available WordPress performance', 'litespeed-cache'); ?></strong> </p> <p class="litespeed-margin-bottom20 litespeed-margin-top-remove"> <?php echo sprintf(__('Globally fast TTFB, easy setup, and <a %s>more</a>!', 'litespeed-cache'), ' href="https://www.quic.cloud/quic-cloud-services-and-features/litespeed-cache-service/" target="_blank"'); ?> </p> </div> <?php else : ?> <?php echo $__cloud->load_qc_status_for_dash('cdn_dash_mini'); ?> <?php endif; ?> </div> <?php if ($__cloud->activated()) : ?> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <a href="<?php echo Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_SYNC_STATUS); ?>" class="button button-<?php echo ($cloud_summary['qc_activated'] != 'cdn' ? 'link' : 'secondary'); ?> button-small"> <?php if ($cloud_summary['qc_activated'] == 'cdn') : ?> <span class="dashicons dashicons-update"></span> <?php endif; ?> <?php echo __('Refresh Status', 'litespeed-cache'); ?> <span class="screen-reader-text"><?php echo __('Refresh QUIC.cloud status', 'litespeed-cache'); ?></span> </a> </div> <?php endif; ?> </div> <?php $promo_mini = $__cloud->load_qc_status_for_dash('promo_mini'); ?> <?php if ($promo_mini) : ?> <?php echo $promo_mini; ?> <?php endif; ?> <?php if ($__cloud->activated()) : ?> <?php $news = $__cloud->load_qc_status_for_dash('news_dash'); ?> <?php if ($news) : ?> <div class="postbox litespeed-postbox"> <div class="inside litespeed-text-center"> <h3 class="litespeed-title"> <?php echo __('News', 'litespeed-cache'); ?> </h3> <div class="litespeed-top20"> <?php echo $news; ?> </div> </div> </div> <?php endif; ?> <?php endif; ?> </div> </div> </div> </div> </div>PK ��}\O��� � dash/entry.tpl.phpnu �[��� <?php namespace LiteSpeed; defined( 'WPINC' ) || exit; $menu_list = array( 'dashboard' => __( 'Dashboard', 'litespeed-cache' ), ); if ( $this->_is_network_admin ) { $menu_list = array( 'network_dash' => __( 'Network Dashboard', 'litespeed-cache' ), ); } ?> <div class="wrap"> <h1 class="litespeed-h1"> <?php echo __( 'LiteSpeed Cache Dashboard', 'litespeed-cache' ); ?> </h1> <span class="litespeed-desc"> v<?php echo Core::VER; ?> </span> <hr class="wp-header-end"> </div> <div class="litespeed-wrap"> <?php foreach ($menu_list as $tab => $val) { echo "<div data-litespeed-layout='$tab'>"; require LSCWP_DIR . "tpl/dash/$tab.tpl.php"; echo "</div>"; } ?> </div> PK ��}\��-�& & dash/network_dash.tpl.phpnu �[��� <?php namespace LiteSpeed; defined( 'WPINC' ) || exit; $cloud_summarys = array(); $blogs = Activation::get_network_ids(); foreach ( $blogs as $blog_id ) { switch_to_blog( $blog_id ); $cloud_summarys[ home_url() ] = Cloud::get_summary(); } ?> <div class="litespeed-dashboard"> <?php foreach ( $cloud_summarys as $home_url => $cloud_summary ) : ?> <div class="litespeed-dashboard-header"> <h3 class="litespeed-dashboard-title"> <?php echo __( 'Usage Statistics', 'litespeed-cache' ) . ': ' . $home_url; ?> </h3> <hr> </div> <div class="litespeed-dashboard-stats-wrapper"> <?php $cat_list = array( 'img_optm' => __('Image Optimization', 'litespeed-cache'), 'page_optm' => __('Page Optimization', 'litespeed-cache'), 'cdn' => __('CDN Bandwidth', 'litespeed-cache'), 'lqip' => __('Low Quality Image Placeholder', 'litespeed-cache'), ); foreach ( $cat_list as $svc => $title ) : $finished_percentage = 0; $total_used = $used = $quota = $pag_used = $pag_total = '-'; $used = $quota = $pag_used = $pag_total = '-'; $pag_width = 0; if ( ! empty( $cloud_summary[ 'usage.' . $svc ] ) ) { $finished_percentage = floor( $cloud_summary[ 'usage.' . $svc ][ 'used' ] * 100 / $cloud_summary[ 'usage.' . $svc ][ 'quota' ] ); $used = $cloud_summary[ 'usage.' . $svc ][ 'used' ]; $quota = $cloud_summary[ 'usage.' . $svc ][ 'quota' ]; $pag_used = ! empty( $cloud_summary[ 'usage.' . $svc ][ 'pag_used' ] ) ? $cloud_summary[ 'usage.' . $svc ][ 'pag_used' ] : 0; $pag_bal = ! empty( $cloud_summary[ 'usage.' . $svc ][ 'pag_bal' ] ) ? $cloud_summary[ 'usage.' . $svc ][ 'pag_bal' ] : 0; $pag_total = $pag_used + $pag_bal; if ( $pag_total ) { $pag_width = round( $pag_used / $pag_total * 100 ) . '%'; } if ( $svc == 'cdn' ) { $used = Utility::real_size( $used * 1024 * 1024 ); $quota = Utility::real_size( $quota * 1024 * 1024 ); $pag_used = Utility::real_size( $pag_used * 1024 * 1024 ); $pag_total = Utility::real_size( $pag_total * 1024 * 1024 ); } } $percentage_bg = 'success'; if( $finished_percentage > 95 ){ $percentage_bg = 'danger'; } elseif ( $finished_percentage > 85 ){ $percentage_bg = 'warning'; } ?> <div class="postbox litespeed-postbox"> <div class="inside"> <h3 class="litespeed-title"><?php echo $title; ?></h3> <div class="litespeed-flex-container"> <div class="litespeed-icon-vertical-middle litespeed-pie-<?php echo $percentage_bg;?>"> <?php echo GUI::pie( $finished_percentage, 60, false ); ?> </div> <div> <div class="litespeed-dashboard-stats"> <h3><?php echo ( $svc == 'img_optm' ? __('Fast Queue Usage','litespeed-cache') : __( 'Usage', 'litespeed-cache' ) ); ?></h3> <p> <strong><?php echo esc_html( $used ); ?></strong> <?php if( $used != $quota ) { ?> <span class="litespeed-desc"> of <?php echo esc_html( $quota ); ?></span> <?php } ?> </p> </div> </div> </div> <?php if ( $pag_total > 0 ) { ?> <p class="litespeed-dashboard-stats-payg" data-balloon-pos="up" aria-label="<?php echo __('Pay as You Go','litespeed-cache'); ?>"> <?php echo __('PAYG Balance','litespeed-cache'); ?>: <strong><?php echo esc_html( $pag_bal ); ?></strong> <button class="litespeed-info-button" data-balloon-pos="up" aria-label="<?php echo __('This Month Usage','litespeed-cache'); ?>: <?php echo esc_html( $pag_used );?>"> <span class="dashicons dashicons-info"></span> <span class="screen-reader-text"><?php echo __( 'Pay as You Go Usage Statistics', 'litespeed-cache' );?></span> </button> </p> <?php } ?> <?php if ( $svc == 'img_optm' ) { ?> <p class="litespeed-dashboard-stats-total"> <?php echo __('Total Usage','litespeed-cache'); ?>: <strong><?php echo esc_html( $total_used ); ?> / ∞</strong> <button class="litespeed-info-button" data-balloon-pos="up" aria-label="<?php echo __('Total images optimized in this month','litespeed-cache'); ?>"> <span class="dashicons dashicons-info"></span> </button> </p> <div class="clear"></div> <?php } ?> </div> </div> <?php endforeach; ?> </div> <?php endforeach; ?> </div>PK ��}\��� $ img_optm/settings.media_webp.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; ?> <tr> <th> <?php $id = Base::O_IMG_OPTM_WEBP; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id, array(__('OFF', 'litespeed-cache'), 'WebP', 'AVIF')); ?> <?php Doc::maybe_on_by_gm($id); ?> <div class="litespeed-desc"> <?php echo __('Request WebP/AVIF versions of original images when doing optimization.', 'litespeed-cache'); ?> <?php echo sprintf(__('Significantly improve load time by replacing images with their optimized %s versions.', 'litespeed-cache'), '.webp/.avif'); ?> <br /><?php Doc::notice_htaccess(); ?> <br /><?php Doc::crawler_affected(); ?> <br /> <font class="litespeed-warning"> ⚠️ <?php echo sprintf(__('%1$s is a %2$s paid feature.', 'litespeed-cache'), 'AVIF', 'QUIC.cloud'); ?></font> <br /> <font class="litespeed-warning"> ⚠️ <?php echo sprintf(__('When switching formats, please %1$s or %2$s to apply this new choice to previously optimized images.', 'litespeed-cache'), __('Destroy All Optimization Data', 'litespeed-cache'), __('Soft Reset Optimization Counter', 'litespeed-cache')); ?></font> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/imageopt/#soft-reset-optimization-counter'); ?> </div> </td> </tr>PK ��}\�Uu�� � img_optm/entry.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $menu_list = array( 'summary' => __('Image Optimization Summary', 'litespeed-cache'), 'settings' => __('Image Optimization Settings', 'litespeed-cache'), ); if ($this->_is_network_admin) { $menu_list = array( 'network_settings' => __('Image Optimization Settings', 'litespeed-cache'), ); } ?> <div class="wrap"> <h1 class="litespeed-h1"> <?php echo __('LiteSpeed Cache Image Optimization', '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 ($menu_list 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 // include all tpl for faster UE foreach ($menu_list as $tab => $val) { echo "<div data-litespeed-layout='$tab'>"; require LSCWP_DIR . "tpl/img_optm/$tab.tpl.php"; echo "</div>"; } ?> </div> </div>PK ��}\�<��= = img_optm/settings.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $this->form_action(); ?> <h3 class="litespeed-title-short"> <?php echo __('Image Optimization Settings', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/imageopt/#image-optimization-settings-tab'); ?> </h3> <table class="wp-list-table striped litespeed-table"> <tbody> <tr> <th> <?php $id = Base::O_IMG_OPTM_AUTO; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('Automatically request optimization via cron job.', 'litespeed-cache'); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_IMG_OPTM_ORI; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('Optimize images and save backups of the originals in the same folder.', 'litespeed-cache'); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_IMG_OPTM_RM_BKUP; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('Automatically remove the original image backups after fetching optimized images.', 'litespeed-cache'); ?> <br /> <font class="litespeed-danger"> 🚨 <?php echo __('This is irreversible.', 'litespeed-cache'); ?> <?php echo __('You will be unable to Revert Optimization once the backups are deleted!', 'litespeed-cache'); ?> </font> </div> </td> </tr> <tr> <th> <?php $id = Base::O_IMG_OPTM_LOSSLESS; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('Optimize images using lossless compression.', 'litespeed-cache'); ?> <?php echo __('This can improve quality but may result in larger images than lossy compression will.', 'litespeed-cache'); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_IMG_OPTM_EXIF; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('Preserve EXIF data (copyright, GPS, comments, keywords, etc) when optimizing.', 'litespeed-cache'); ?> <?php echo __('This will increase the size of optimized files.', 'litespeed-cache'); ?> </div> </td> </tr> <?php if (!is_multisite()) : // webp require LSCWP_DIR . 'tpl/img_optm/settings.media_webp.tpl.php'; endif; ?> <tr> <th> <?php $id = Base::O_IMG_OPTM_WEBP_ATTR; ?> <?php $this->title($id); ?> </th> <td> <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 echo __('Specify which element attributes will be replaced with WebP/AVIF.', 'litespeed-cache'); ?> <?php echo __('Only attributes listed here will be replaced.', 'litespeed-cache'); ?> <br /><?php echo sprintf(__('Use the format %1$s or %2$s (element is optional).', 'litespeed-cache'), '<code>element.attribute</code>', '<code>.attribute</code>'); ?> <?php Doc::one_per_line(); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_IMG_OPTM_WEBP_REPLACE_SRCSET; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo sprintf(__('Enable replacement of WebP/AVIF in %s elements that were generated outside of WordPress logic.', 'litespeed-cache'), '<code>srcset</code>'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/imageopt/#webp-for-extra-srcset'); ?> </div> </td> </tr> </tbody> </table> <?php $this->form_end(); PK ��}\ ��`E `E img_optm/summary.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $closest_server = Cloud::get_summary('server.' . Cloud::SVC_IMG_OPTM); $usage_cloud = Cloud::get_summary('usage.' . Cloud::SVC_IMG_OPTM); $allowance = Cloud::cls()->allowance(Cloud::SVC_IMG_OPTM); $__img_optm = Img_Optm::cls(); $wet_limit = $__img_optm->wet_limit(); $img_count = $__img_optm->img_count(); $optm_summary = Img_Optm::get_summary(); list($last_run, $is_running) = $__img_optm->cron_running(false); $finished_percentage = 0; if ($img_count['groups_all']) $finished_percentage = 100 - floor($img_count['groups_new'] * 100 / $img_count['groups_all']); if ($finished_percentage == 100 && $img_count['groups_new']) { $finished_percentage = 99; } $unfinished_num = 0; if (!empty($img_count['img.' . Img_Optm::STATUS_REQUESTED])) { $unfinished_num += $img_count['img.' . Img_Optm::STATUS_REQUESTED]; } if (!empty($img_count['img.' . Img_Optm::STATUS_NOTIFIED])) { $unfinished_num += $img_count['img.' . Img_Optm::STATUS_NOTIFIED]; } if (!empty($img_count['img.' . Img_Optm::STATUS_ERR_FETCH])) { $unfinished_num += $img_count['img.' . Img_Optm::STATUS_ERR_FETCH]; } $imgoptm_service_hot = $this->cls('Cloud')->service_hot(Cloud::SVC_IMG_OPTM . '-' . Img_Optm::CLOUD_ACTION_NEW_REQ); ?> <div class="litespeed-flex-container litespeed-column-with-boxes"> <div class="litespeed-width-7-10 litespeed-column-left litespeed-image-optim-summary-wrapper"> <div class="litespeed-image-optim-summary"> <h3> <?php if ($closest_server) : ?> <a href="<?php echo Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_REDETECT_CLOUD, false, null, array('svc' => Cloud::SVC_IMG_OPTM)); ?>" class="litespeed-info-button litespeed-redetect" data-balloon-pos="right" data-balloon-break aria-label="<?php echo sprintf(__('Current closest Cloud server is %s. Click to redetect.', 'litespeed-cache'), $closest_server); ?>" data-litespeed-cfm="<?php echo __('Are you sure you want to redetect the closest cloud server for this service?', 'litespeed-cache'); ?>"><span class="litespeed-quic-icon"></span> <?php echo __('Redetect', 'litespeed-cache'); ?></a> <?php else : ?> <span class="litespeed-quic-icon"></span> <?php echo __('Redetect', 'litespeed-cache'); ?> <?php endif; ?> <?php echo __('Optimize images with our QUIC.cloud server', 'litespeed-cache'); ?> <a href="https://docs.litespeedtech.com/lscache/lscwp/imageopt/#image-optimization-summary-tab" target="_blank" class="litespeed-right litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache'); ?></a> </h3> <p> <?php echo sprintf(__('You can request a maximum of %s images at once.', 'litespeed-cache'), '<strong>' . intval($allowance) . '</strong>'); ?> </p> <?php if ($wet_limit) : ?> <p class="litespeed-desc"> <?php echo __('To make sure our server can communicate with your server without any issues and everything works fine, for the few first requests the number of image groups allowed in a single request is limited.', 'litespeed-cache'); ?> <?php echo __('Current limit is', 'litespeed-cache') . ': <strong>' . $wet_limit . '</strong>'; ?> </p> <?php endif; ?> <div class="litespeed-img-optim-actions"> <?php if ($imgoptm_service_hot) : ?> <button class="button button-secondary" disabled> <span class="dashicons dashicons-images-alt2"></span> <?php echo __('Send Optimization Request', 'litespeed-cache'); ?> - <?php echo sprintf(__('Available after %d second(s)', 'litespeed-cache'), $imgoptm_service_hot); ?> </button> <?php else : ?> <a data-litespeed-onlyonce class="button button-primary" <?php if (!empty($img_count['groups_new']) || !empty($img_count['group.' . Img_Optm::STATUS_RAW])) : ?> href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_NEW_REQ); ?>" <?php else : ?> href='javascript:;' disabled <?php endif; ?>> <span class="dashicons dashicons-images-alt2"></span> <?php echo __('Send Optimization Request', 'litespeed-cache'); ?> </a> <?php endif; ?> <a data-litespeed-onlyonce class="button button-secondary" data-balloon-length="large" data-balloon-pos="right" aria-label="<?php echo __('Only press the button if the pull cron job is disabled.', 'litespeed-cache'); ?> <?php echo __('Images will be pulled automatically if the cron job is running.', 'litespeed-cache'); ?>" <?php if (!empty($img_count['img.' . Img_Optm::STATUS_NOTIFIED]) && !$is_running) : ?> href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_PULL); ?>" <?php else : ?> href='javascript:;' disabled <?php endif; ?>> <?php echo __('Pull Images', 'litespeed-cache'); ?> </a> </div> <div> <h3 class="litespeed-title-section"> <?php echo __('Optimization Status', 'litespeed-cache'); ?> </h3> <div class="litespeed-light-code"> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_NEW])) : ?> <p class="litespeed-success"> <?php echo Lang::img_status(Img_Optm::STATUS_NEW); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group_new']); ?> </code> </p> <?php endif; ?> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_RAW])) : ?> <p class="litespeed-success"> <?php echo Lang::img_status(Img_Optm::STATUS_RAW); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group.' . Img_Optm::STATUS_RAW]); ?> (<?php echo Admin_Display::print_plural($img_count['img.' . Img_Optm::STATUS_RAW], 'image'); ?>) </code> </p> <?php endif; ?> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_REQUESTED])) : ?> <p class="litespeed-success"> <?php echo Lang::img_status(Img_Optm::STATUS_REQUESTED); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group.' . Img_Optm::STATUS_REQUESTED]); ?> (<?php echo Admin_Display::print_plural($img_count['img.' . Img_Optm::STATUS_REQUESTED], 'image'); ?>) </code> </p> <p class="litespeed-desc"> <?php echo __('After the QUIC.cloud Image Optimization server finishes optimization, it will notify your site to pull the optimized images.', 'litespeed-cache'); ?> <?php echo __('This process is automatic.', 'litespeed-cache'); ?> </p> <?php endif; ?> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_NOTIFIED])) : ?> <p class="litespeed-success"> <?php echo Lang::img_status(Img_Optm::STATUS_NOTIFIED); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group.' . Img_Optm::STATUS_NOTIFIED]); ?> (<?php echo Admin_Display::print_plural($img_count['img.' . Img_Optm::STATUS_NOTIFIED], 'image'); ?>) </code> </p> <?php if ($last_run) : ?> <p class="litespeed-desc"> <?php echo sprintf(__('Last pull initiated by cron at %s.', 'litespeed-cache'), '<code>' . Utility::readable_time($last_run) . '</code>'); ?> </p> <?php endif; ?> <?php endif; ?> <?php if (!empty($img_count['group.' . Img_Optm::STATUS_PULLED])) : ?> <p class="litespeed-success"> <?php echo Lang::img_status(Img_Optm::STATUS_PULLED); ?>: <code> <?php echo Admin_Display::print_plural($img_count['group.' . Img_Optm::STATUS_PULLED]); ?> (<?php echo Admin_Display::print_plural($img_count['img.' . Img_Optm::STATUS_PULLED], 'image'); ?>) </code> </p> <?php endif; ?> <p><?php echo sprintf( '<a href="%1$s" class="button button-secondary litespeed-btn-warning" data-balloon-pos="right" aria-label="%2$s" %3$s><span class="dashicons dashicons-editor-removeformatting"></span> %4$s</a>', ($unfinished_num ? Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_CLEAN) : 'javascript:;'), __('Remove all previous unfinished image optimization requests.', 'litespeed-cache'), ($unfinished_num ? '' : ' disabled'), __('Clean Up Unfinished Data', 'litespeed-cache') . ($unfinished_num ? ': ' . Admin_Display::print_plural($unfinished_num, 'image') : '') ); ?></p> <h3 class="litespeed-title-section"> <?php echo __('Storage Optimization', 'litespeed-cache'); ?> </h3> <p> <?php echo __('A backup of each image is saved before it is optimized.', 'litespeed-cache'); ?> </p> <?php if (!empty($optm_summary['bk_summary'])) : ?> <div class=""> <p> <?php echo __('Last calculated', 'litespeed-cache') . ': <code>' . Utility::readable_time($optm_summary['bk_summary']['date']) . '</code>'; ?> </p> <?php if ($optm_summary['bk_summary']['count']) : ?> <p> <?php echo __('Files', 'litespeed-cache') . ': <code>' . intval($optm_summary['bk_summary']['count']) . '</code>'; ?> </p> <p> <?php echo __('Total', 'litespeed-cache') . ': <code>' . Utility::real_size($optm_summary['bk_summary']['sum']) . '</code>'; ?> </p> <?php endif; ?> </div> <?php endif; ?> <div> <a class="button button-secondary" data-balloon-pos="up" aria-label="<?php echo __('Calculate Original Image Storage', 'litespeed-cache'); ?>" <?php if ($finished_percentage > 0) : ?> href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_CALC_BKUP); ?>" <?php else : ?> href='javascript:;' disabled <?php endif; ?>> <span class="dashicons dashicons-update"></span> <?php echo __('Calculate Backups Disk Space', 'litespeed-cache'); ?> </a> </div> </div> <div> <h4><?php echo __('Image Thumbnail Group Sizes', 'litespeed-cache'); ?></h4> <div class="litespeed-desc litespeed-left20"> <?php foreach (Media::cls()->get_image_sizes() as $title => $size) { echo "<div>$title ( " . ($size['width'] ? $size['width'] . 'px' : '*') . ' x ' . ($size['height'] ? $size['height'] . 'px' : '*') . ' )</div>'; }; ?> </div> </div> <hr class="litespeed-hr-with-space"> <div> <h4><?php echo __('Delete all backups of the original images', 'litespeed-cache'); ?></h4> <div class="notice notice-error litespeed-callout-bg inline"> <p> 🚨 <?php echo __('This is irreversible.', 'litespeed-cache'); ?> <?php echo __('You will be unable to Revert Optimization once the backups are deleted!', 'litespeed-cache'); ?> </p> </div> </div> <?php if (!empty($optm_summary['rmbk_summary'])) : ?> <div class=""> <p> <?php echo __('Last ran', 'litespeed-cache') . ': <code>' . Utility::readable_time($optm_summary['rmbk_summary']['date']) . '</code>'; ?> </p> <p> <?php echo __('Files', 'litespeed-cache') . ': <code>' . $optm_summary['rmbk_summary']['count'] . '</code>'; ?> </p> <p> <?php echo __('Saved', 'litespeed-cache') . ': <code>' . Utility::real_size($optm_summary['rmbk_summary']['sum']) . '</code>'; ?> </p> </div> <?php endif; ?> <div class="litespeed-image-optim-summary-footer"><a href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_RM_BKUP); ?>" data-litespeed-cfm="<?php echo __('Are you sure you want to remove all image backups?', 'litespeed-cache'); ?>" class="litespeed-link-with-icon litespeed-danger"> <span class="dashicons dashicons-trash"></span><?php echo __('Remove Original Image Backups', 'litespeed-cache'); ?> </a></div> </div> </div> </div> <div class="litespeed-width-3-10 litespeed-column-right"> <div class="postbox litespeed-postbox litespeed-postbox-imgopt-info"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Image Information', 'litespeed-cache'); ?> </h3> <div class="litespeed-flex-container"> <div class="litespeed-icon-vertical-middle"> <?php echo GUI::pie($finished_percentage, 70, true); ?> </div> <div> <p> <?php echo __('Image groups total', 'litespeed-cache'); ?>: <?php if ($img_count['groups_new']) : ?> <code><?php echo Admin_Display::print_plural($img_count['groups_new'], 'group'); ?></code> <?php else : ?> <font class="litespeed-congratulate"><?php echo __('Congratulations, all gathered!', 'litespeed-cache'); ?></font> <?php endif; ?> <a href="https://docs.litespeedtech.com/lscache/lscwp/imageopt/#what-is-an-image-group" target="_blank" class="litespeed-desc litespeed-help-btn-icon" data-balloon-pos="up" aria-label="<?php echo __('What is a group?', 'litespeed-cache'); ?>"> <span class="dashicons dashicons-editor-help"></span> <span class="screen-reader-text"><?php echo __('What is an image group?', 'litespeed-cache'); ?></span> </a> </p> <p> <?php echo __('Current image post id position', 'litespeed-cache'); ?>: <?php echo !empty($optm_summary['next_post_id']) ? $optm_summary['next_post_id'] : '-'; ?><br> <?php echo __('Maximum image post id', 'litespeed-cache'); ?>: <?php echo $img_count['max_id']; ?> </p> </div> </div> </div> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact" style="display: none;"> <a href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_RESCAN); ?>" class="" data-balloon-pos="up" data-balloon-length="large" aria-label="<?php echo __('Scan for any new unoptimized image thumbnail sizes and resend necessary image optimization requests.', 'litespeed-cache'); ?>"> <?php echo __('Rescan New Thumbnails', 'litespeed-cache'); ?> </a> </div> </div> <div class="postbox litespeed-postbox"> <div class="inside"> <h3 class="litespeed-title"> <?php echo __('Optimization Summary', 'litespeed-cache'); ?> </h3> <p> <?php echo __('Total Reduction', 'litespeed-cache'); ?>: <code><?php echo isset($optm_summary['reduced']) ? Utility::real_size($optm_summary['reduced']) : '-'; ?></code> </p> <p> <?php echo __('Images Pulled', 'litespeed-cache'); ?>: <code><?php echo isset($optm_summary['img_taken']) ? $optm_summary['img_taken'] : '-'; ?></code> </p> <p> <?php echo __('Last Request', 'litespeed-cache'); ?>: <code><?php echo isset($optm_summary['last_requested']) ? Utility::readable_time($optm_summary['last_requested']) : '-'; ?></code> </p> <p> <?php echo __('Last Pulled', 'litespeed-cache'); ?>: <code><?php echo isset($optm_summary['last_pulled']) ? Utility::readable_time($optm_summary['last_pulled']) : '-'; ?></code> <?php if (isset($optm_summary['last_pulled_by_cron']) && $optm_summary['last_pulled_by_cron']) echo '(Cron)'; ?> </p> </div> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact litespeed-desc"> <?php echo sprintf(__('Results can be checked in <a %s>Media Library</a>.', 'litespeed-cache'), 'href="upload.php?mode=list"'); ?> </div> </div> <div class="postbox litespeed-postbox"> <div class="inside"> <h3 class="litespeed-title"><?php echo __('Optimization Tools', 'litespeed-cache'); ?></h3> <p> <?php echo __('You can quickly switch between using original (unoptimized versions) and optimized image files. It will affect all images on your website, both regular and webp versions if available.', 'litespeed-cache'); ?> </p> <div class="litespeed-links-group"> <span> <a href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_BATCH_SWITCH_ORI); ?>" class="litespeed-link-with-icon" data-balloon-pos="up" aria-label="<?php echo __('Use original images (unoptimized) on your site', 'litespeed-cache'); ?>"> <span class="dashicons dashicons-undo"></span><?php echo __('Use Original Files', 'litespeed-cache'); ?> </a> </span><span> <a href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_BATCH_SWITCH_OPTM); ?>" class="litespeed-link-with-icon litespeed-icon-right" data-balloon-pos="up" aria-label="<?php echo __('Switch back to using optimized images on your site', 'litespeed-cache'); ?>"> <?php echo __('Use Optimized Files', 'litespeed-cache'); ?><span class="dashicons dashicons-redo"></span> </a> </span> </div> </div> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <p><a href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_RESET_COUNTER); ?>" class="litespeed-link-with-icon litespeed-warning"> <span class="dashicons dashicons-dismiss"></span><?php echo __('Soft Reset Optimization Counter', 'litespeed-cache'); ?> </a></p> <div class="litespeed-desc"> <?php echo sprintf(__('This will reset the %1$s. If you changed WebP/AVIF settings and want to generate %2$s for the previously optimized images, use this action.', 'litespeed-cache'), '<code>' . __('Current image post id position', 'litespeed-cache') . '</code>', 'WebP/AVIF'); ?> </div> </div> <div class="inside litespeed-postbox-footer litespeed-postbox-footer--compact"> <p><a href="<?php echo Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_DESTROY); ?>" class="litespeed-link-with-icon litespeed-danger" data-litespeed-cfm="<?php echo __('Are you sure to destroy all optimized images?', 'litespeed-cache'); ?>"> <span class="dashicons dashicons-dismiss"></span><?php echo __('Destroy All Optimization Data', 'litespeed-cache'); ?> </a></p> <div class="litespeed-desc"> <?php echo __('Remove all previous image optimization requests/results, revert completed optimizations, and delete all optimization files.', 'litespeed-cache'); ?> </div> </div> </div> </div> </div>PK ��}\�P�> ! img_optm/network_settings.tpl.phpnu �[��� <?php namespace LiteSpeed; defined( 'WPINC' ) || exit; $this->form_action( Router::ACTION_SAVE_SETTINGS_NETWORK ); ?> <h3 class="litespeed-title-short"> <?php echo __( 'Image Optimization Settings', 'litespeed-cache' ); ?> <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/imageopt/#image-optimization-settings-tab' ); ?> </h3> <table class="wp-list-table striped litespeed-table"><tbody> <?php require LSCWP_DIR . 'tpl/img_optm/settings.media_webp.tpl.php'; ?> </tbody></table> <?php $this->form_end( true ); PK ��}\.#�˔ � crawler/entry.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $menu_list = array( 'summary' => __('Summary', 'litespeed-cache'), 'map' => __('Map', 'litespeed-cache'), 'blacklist' => __('Blocklist', 'litespeed-cache'), 'settings' => __('Settings', 'litespeed-cache'), ); ?> <div class="wrap"> <h1 class="litespeed-h1"> <?php echo __('LiteSpeed Cache Crawler', '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 ($menu_list 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 // include all tpl for faster UE foreach ($menu_list as $tab => $val) { echo "<div data-litespeed-layout='$tab'>"; require LSCWP_DIR . "tpl/crawler/$tab.tpl.php"; echo "</div>"; } ?> </div> </div> <iframe name="litespeedHiddenIframe" src="" width="0" height="0" frameborder="0"></iframe>PK �}\�zH� � crawler/map.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $crawler_summary = Crawler::get_summary(); $__map = Crawler_Map::cls(); $list = $__map->list_map(30); $count = $__map->count_map(); $pagination = Utility::pagination($count, 30); ?> <p class="litespeed-right"> <a href="<?php echo Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_EMPTY); ?>" class="button litespeed-btn-warning"> <?php echo __('Clean Crawler Map', 'litespeed-cache'); ?> </a> <a href="<?php echo Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_REFRESH_MAP); ?>" class="button button-secondary"> <?php echo __('Refresh Crawler Map', 'litespeed-cache'); ?> </a> </p> <p> <?php if (!empty($crawler_summary['sitemap_time'])) { echo sprintf(__('Generated at %s', 'litespeed-cache'), Utility::readable_time($crawler_summary['sitemap_time'])); } ?> </p> <h3 class="litespeed-title"> <?php echo __('Sitemap List', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/crawler/#map-tab'); ?> </h3> <?php echo __('Sitemap Total', 'litespeed-cache') . ': ' . $count; ?> <div style="display: flex; justify-content: space-between;"> <div style="margin-top:10px;"> <form action="<?php echo admin_url('admin.php?page=litespeed-crawler'); ?>" method="post"> <input type="text" name="kw" value="<?php echo !empty($_POST['kw']) ? esc_html($_POST['kw']) : ''; ?>" placeholder="<?php echo __('URL Search'); ?>" style="width: 600px;" /> </form> </div> <div class=""> <a style="padding-right:10px;" href="<?php echo admin_url('admin.php?page=litespeed-crawler&' . Router::TYPE . '=hit'); ?>"><?php echo __('Cache Hit', 'litespeed-cache'); ?></a> <a style="padding-right:10px;" href="<?php echo admin_url('admin.php?page=litespeed-crawler&' . Router::TYPE . '=miss'); ?>"><?php echo __('Cache Miss', 'litespeed-cache'); ?></a> <a style="padding-right:10px;" href="<?php echo admin_url('admin.php?page=litespeed-crawler&' . Router::TYPE . '=blacklisted'); ?>"><?php echo __('Blocklisted', 'litespeed-cache'); ?></a> </div> <div class=""> <?php echo $pagination; ?> </div> </div> <div class="litespeed-table-responsive"> <table class="wp-list-table widefat striped"> <thead> <tr> <th scope="col">#</th> <th scope="col"><?php echo __('URL', 'litespeed-cache'); ?></th> <th scope="col"><?php echo __('Crawler Status', 'litespeed-cache'); ?></th> <th scope="col"><?php echo __('Operation', 'litespeed-cache'); ?></th> </tr> </thead> <tbody> <?php foreach ($list as $i => $v) : ?> <tr> <td><?php echo $i + 1; ?></td> <td> <?php echo $v['url']; ?> </td> <td> <?php echo Crawler::cls()->display_status($v['res'], $v['reason']); ?> </td> <td> <a href="<?php echo Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_BLACKLIST_ADD, false, null, array('id' => $v['id'])); ?>" class="button button-secondary"><?php echo __('Add to Blocklist', 'litespeed-cache'); ?></a> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php echo $pagination; ?> <p> <i class="litespeed-dot litespeed-bg-success"></i> = <?php echo __('Cache Hit', 'litespeed-cache'); ?><br> <i class="litespeed-dot litespeed-bg-primary"></i> = <?php echo __('Cache Miss', 'litespeed-cache'); ?><br> <i class="litespeed-dot litespeed-bg-warning"></i> = <?php echo __('Blocklisted due to not cacheable', 'litespeed-cache'); ?><br> <i class="litespeed-dot litespeed-bg-danger"></i> = <?php echo __('Blocklisted', 'litespeed-cache'); ?><br> </p>PK �}\��,�� � crawler/settings.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $this->form_action(); ?> <h3 class="litespeed-title-short"> <?php echo __('Crawler General Settings', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/crawler/#general-settings-tab'); ?> </h3> <table class="wp-list-table striped litespeed-table"> <tbody> <tr> <th> <?php $id = Base::O_CRAWLER; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('This will enable crawler cron.', 'litespeed-cache'); ?> <br /><?php Doc::notice_htaccess(); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_CRAWLER_CRAWL_INTERVAL; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_input($id); ?> <?php echo __('seconds', 'litespeed-cache'); ?> <div class="litespeed-desc"> <?php echo __('Specify how long in seconds before the crawler should initiate crawling the entire sitemap again.', 'litespeed-cache'); ?> <?php $this->recommended($id); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_CRAWLER_SITEMAP; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_textarea($id); ?> <div class="litespeed-desc"> <?php echo __('The crawler will use your XML sitemap or sitemap index. Enter the full URL to your sitemap here.', 'litespeed-cache'); ?> <?php Doc::one_per_line(); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_CRAWLER_LOAD_LIMIT; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_input($id); ?> <div class="litespeed-desc"> <?php echo __('The maximum average server load allowed while crawling. The number of crawler threads in use will be actively reduced until average server load falls under this limit. If this cannot be achieved with a single thread, the current crawler run will be terminated.', 'litespeed-cache'); ?> <?php if (!empty($_SERVER[Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE])) : ?> <font class="litespeed-warning"> <?php echo __('NOTE', 'litespeed-cache'); ?>: <?php echo __('Server enforced value', 'litespeed-cache'); ?>: <code><?php echo $_SERVER[Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE]; ?></code> </font> <?php elseif (!empty($_SERVER[Base::ENV_CRAWLER_LOAD_LIMIT])) : ?> <font class="litespeed-warning"> <?php echo __('NOTE', 'litespeed-cache'); ?>: <?php echo __('Server allowed max value', 'litespeed-cache'); ?>: <code><?php echo $_SERVER[Base::ENV_CRAWLER_LOAD_LIMIT]; ?></code> </font> <?php endif; ?> <br /> <?php $this->_api_env_var(Base::ENV_CRAWLER_LOAD_LIMIT, Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_CRAWLER_ROLES; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_textarea($id, 20); ?> <div class="litespeed-desc"> <?php echo __('To crawl the site as a logged-in user, enter the user ids to be simulated.', 'litespeed-cache'); ?> <?php Doc::one_per_line(); ?> <?php if (empty($this->conf(Base::O_SERVER_IP))) : ?> <div class="litespeed-danger litespeed-text-bold"> 🚨 <?php echo __('NOTICE', 'litespeed-cache'); ?>: <?php echo sprintf(__('You must set %s before using this feature.', 'litespeed-cache'), Lang::title(Base::O_SERVER_IP)); ?> <?php echo Doc::learn_more(admin_url('admin.php?page=litespeed-general#settings'), __('Click here to set.', 'litespeed-cache'), true, false, true); ?> </div> <?php endif; ?> <?php if (empty($this->conf(Base::O_ESI))) : ?> <div class="litespeed-danger litespeed-text-bold"> 🚨 <?php echo __('NOTICE', 'litespeed-cache'); ?>: <?php echo sprintf(__('You must set %1$s to %2$s before using this feature.', 'litespeed-cache'), Lang::title(Base::O_ESI), __('ON', 'litespeed-cache')); ?> <?php echo Doc::learn_more(admin_url('admin.php?page=litespeed-cache#esi'), __('Click here to set.', 'litespeed-cache'), true, false, true); ?> </div> <?php endif; ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_CRAWLER_COOKIES; ?> <?php $this->title($id); ?> </th> <td> <?php $this->enroll($id . '[name][]'); ?> <?php $this->enroll($id . '[vals][]'); ?> <div id="litespeed_crawler_simulation_div"></div> <script type="text/babel"> ReactDOM.render( <CrawlerSimulate list={ <?php echo json_encode($this->conf($id)); ?> } />, document.getElementById( 'litespeed_crawler_simulation_div' ) ); </script> <div class="litespeed-desc"> <?php echo __('To crawl for a particular cookie, enter the cookie name, and the values you wish to crawl for. Values should be one per line. There will be one crawler created per cookie value, per simulated role.', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/crawler/#cookie-simulation'); ?> <p><?php echo sprintf(__('Use %1$s in %2$s to indicate this cookie has not been set.', 'litespeed-cache'), '<code>_null</code>', __('Cookie Values', 'litespeed-cache')); ?></p> </div> </td> </tr> </tbody> </table> <?php $this->form_end(); PK �}\1~���) �) crawler/summary.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $__crawler = Crawler::cls(); $crawler_list = $__crawler->list_crawlers(); $summary = Crawler::get_summary(); if ($summary['curr_crawler'] >= count($crawler_list)) { $summary['curr_crawler'] = 0; } $is_running = time() - $summary['is_running'] <= 900; $disabled = Router::can_crawl() ? '' : 'disabled'; $disabled_tip = ''; if (!$this->conf(Base::O_CRAWLER_SITEMAP)) { $disabled = 'disabled'; $disabled_tip = '<span class="litespeed-callout notice notice-error inline litespeed-left20">' . sprintf(__('You need to set the %s in Settings first before using the crawler', 'litespeed-cache'), '<code>' . Lang::title(Base::O_CRAWLER_SITEMAP) . '</code>') . '</span>'; } $CRAWLER_RUN_INTERVAL = defined('LITESPEED_CRAWLER_RUN_INTERVAL') ? LITESPEED_CRAWLER_RUN_INTERVAL : 600; if ($CRAWLER_RUN_INTERVAL > 0) : $recurrence = ''; $hours = (int)floor($CRAWLER_RUN_INTERVAL / 3600); if ($hours) { if ($hours > 1) { $recurrence .= sprintf(__('%d hours', 'litespeed-cache'), $hours); } else { $recurrence .= sprintf(__('%d hour', 'litespeed-cache'), $hours); } } $minutes = (int)floor(($CRAWLER_RUN_INTERVAL % 3600) / 60); if ($minutes) { $recurrence .= ' '; if ($minutes > 1) { $recurrence .= sprintf(__('%d minutes', 'litespeed-cache'), $minutes); } else { $recurrence .= sprintf(__('%d minute', 'litespeed-cache'), $minutes); } } ?> <h3 class="litespeed-title litespeed-relative"> <?php echo __('Crawler Cron', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/crawler/'); ?> </h3> <?php if (!Router::can_crawl()) : ?> <div class="litespeed-callout notice notice-error inline"> <h4><?php echo __('WARNING', 'litespeed-cache'); ?></h4> <p><?php echo __('The crawler feature is not enabled on the LiteSpeed server. Please consult your server admin or hosting provider.', 'litespeed-cache'); ?></p> <p><?php echo sprintf(__('See <a %s>Introduction for Enabling the Crawler</a> for detailed information.', 'litespeed-cache'), 'href="https://docs.litespeedtech.com/lscache/lscwp/admin/#enabling-and-limiting-the-crawler" target="_blank"'); ?></p> </div> <?php endif; ?> <?php if ($summary['this_full_beginning_time']) : ?> <p> <b><?php echo __('Current sitemap crawl started at', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($summary['this_full_beginning_time']); ?> </p> <?php if (!$is_running) : ?> <p> <b><?php echo __('The next complete sitemap crawl will start at', 'litespeed-cache'); ?>:</b> <?php echo date('m/d/Y H:i:s', $summary['this_full_beginning_time'] + LITESPEED_TIME_OFFSET + $summary['last_full_time_cost'] + $this->conf(Base::O_CRAWLER_CRAWL_INTERVAL)); ?> <?php endif; ?> </p> <?php endif; ?> <?php if ($summary['last_full_time_cost']) : ?> <p> <b><?php echo __('Last complete run time for all crawlers', 'litespeed-cache'); ?>:</b> <?php echo sprintf(__('%d seconds', 'litespeed-cache'), $summary['last_full_time_cost']); ?> </p> <?php endif; ?> <?php if ($summary['last_crawler_total_cost']) : ?> <p> <b><?php echo __('Run time for previous crawler', 'litespeed-cache'); ?>:</b> <?php echo sprintf(__('%d seconds', 'litespeed-cache'), $summary['last_crawler_total_cost']); ?> </p> <?php endif; ?> <?php if ($summary['curr_crawler_beginning_time']) : ?> <p> <b><?php echo __('Current crawler started at', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($summary['curr_crawler_beginning_time']); ?> </p> <?php endif; ?> <p> <b><?php echo __('Current server load', 'litespeed-cache'); ?>:</b> <?php echo $__crawler->get_server_load(); ?> </p> <?php if ($summary['last_start_time']) : ?> <p class='litespeed-desc'> <b><?php echo __('Last interval', 'litespeed-cache'); ?>:</b> <?php echo Utility::readable_time($summary['last_start_time']); ?> </p> <?php endif; ?> <?php if ($summary['end_reason']) : ?> <p class='litespeed-desc'> <b><?php echo __('Ended reason', 'litespeed-cache'); ?>:</b> <?php echo esc_html($summary['end_reason']); ?> </p> <?php endif; ?> <?php if ($summary['last_crawled']) : ?> <p class='litespeed-desc'> <?php echo sprintf(__('<b>Last crawled:</b> %s item(s)', 'litespeed-cache'), $summary['last_crawled']); ?> </p> <?php endif; ?> <p> <?php echo " <a href='" . Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_RESET) . "' class='button litespeed-btn-warning'>" . __('Reset position', 'litespeed-cache') . "</a>"; $href = Router::can_crawl() ? Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_START) : 'javascript:;'; echo " <a href='$href' id='litespeed_manual_trigger' class='button litespeed-btn-success' litespeed-accesskey='R' $disabled>" . __('Manually run', 'litespeed-cache') . "</a>"; echo $disabled_tip; ?> </p> <div class="litespeed-table-responsive"> <table class="wp-list-table widefat striped" data-crawler-list> <thead> <tr> <th scope="col">#</th> <th scope="col"><?php echo __('Cron Name', 'litespeed-cache'); ?></th> <th scope="col"><?php echo __('Run Frequency', 'litespeed-cache'); ?></th> <th scope="col"><?php echo __('Status', 'litespeed-cache'); ?></th> <th scope="col"><?php echo __('Activate', 'litespeed-cache'); ?></th> <th scope="col"><?php echo __('Running', 'litespeed-cache'); ?></th> </tr> </thead> <tbody> <?php foreach ($crawler_list as $i => $v) : $hit = !empty($summary['crawler_stats'][$i][Crawler::STATUS_HIT]) ? $summary['crawler_stats'][$i][Crawler::STATUS_HIT] : 0; $miss = !empty($summary['crawler_stats'][$i][Crawler::STATUS_MISS]) ? $summary['crawler_stats'][$i][Crawler::STATUS_MISS] : 0; $blacklisted = !empty($summary['crawler_stats'][$i][Crawler::STATUS_BLACKLIST]) ? $summary['crawler_stats'][$i][Crawler::STATUS_BLACKLIST] : 0; $blacklisted += !empty($summary['crawler_stats'][$i][Crawler::STATUS_NOCACHE]) ? $summary['crawler_stats'][$i][Crawler::STATUS_NOCACHE] : 0; if (isset($summary['crawler_stats'][$i][Crawler::STATUS_WAIT])) { $waiting = $summary['crawler_stats'][$i][Crawler::STATUS_WAIT] ?: 0; } else { $waiting = $summary['list_size'] - $hit - $miss - $blacklisted; } ?> <tr> <td> <?php echo $i + 1; if ($i == $summary['curr_crawler']) { echo "<img class='litespeed-crawler-curr' src='" . LSWCP_PLUGIN_URL . "assets/img/Litespeed.icon.svg' />"; } ?> </td> <td> <?php echo $v['title']; ?> </td> <td><?php echo $recurrence; ?></td> <td> <?php echo '<i class="litespeed-badge litespeed-bg-default" data-balloon-pos="up" aria-label="' . __('Waiting', 'litespeed-cache') . '">' . ($waiting ?: '-') . '</i> '; ?> <?php echo '<i class="litespeed-badge litespeed-bg-success" data-balloon-pos="up" aria-label="' . __('Hit', 'litespeed-cache') . '">' . ($hit ?: '-') . '</i> '; ?> <?php echo '<i class="litespeed-badge litespeed-bg-primary" data-balloon-pos="up" aria-label="' . __('Miss', 'litespeed-cache') . '">' . ($miss ?: '-') . '</i> '; ?> <?php echo '<i class="litespeed-badge litespeed-bg-danger" data-balloon-pos="up" aria-label="' . __('Blocklisted', 'litespeed-cache') . '">' . ($blacklisted ?: '-') . '</i> '; ?> </td> <td> <?php $this->build_toggle('litespeed-crawler-' . $i, $__crawler->is_active($i)); ?> <?php if (!empty($v['uid']) && empty($this->conf(Base::O_SERVER_IP))) : ?> <div class="litespeed-danger litespeed-text-bold"> 🚨 <?php echo __('NOTICE', 'litespeed-cache'); ?>: <?php echo sprintf(__('You must set %s before using this feature.', 'litespeed-cache'), Lang::title(Base::O_SERVER_IP)); ?> <?php echo Doc::learn_more(admin_url('admin.php?page=litespeed-general#settings'), __('Click here to set.', 'litespeed-cache'), true, false, true); ?> </div> <?php endif; ?> </td> <td> <?php if ($i == $summary['curr_crawler']) { echo "Position: " . ($summary['last_pos'] + 1); if ($is_running) { echo " <span class='litespeed-label-success'>" . __('running', 'litespeed-cache') . "</span>"; } } ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <p> <i class="litespeed-badge litespeed-bg-default"></i> = <?php echo __('Waiting to be Crawled', 'litespeed-cache'); ?><br> <i class="litespeed-badge litespeed-bg-success"></i> = <?php echo __('Already Cached', 'litespeed-cache'); ?><br> <i class="litespeed-badge litespeed-bg-primary"></i> = <?php echo __('Successfully Crawled', 'litespeed-cache'); ?><br> <i class="litespeed-badge litespeed-bg-danger"></i> = <?php echo __('Blocklisted', 'litespeed-cache'); ?><br> </p> <div class="litespeed-desc"> <div><?php echo __('Run frequency is set by the Interval Between Runs setting.', 'litespeed-cache'); ?></div> <div><?php echo __('Crawlers cannot run concurrently.', 'litespeed-cache') . __(' If both the cron and a manual run start at similar times, the first to be started will take precedence.', 'litespeed-cache'); ?></div> <div><?php echo sprintf(__('Please see <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to learn how to create the system cron task.', 'litespeed-cache'), ' href="https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/" target="_blank" '); ?></div> </div> <?php endif; ?> <h3 class="litespeed-title"><?php echo __('Watch Crawler Status', 'litespeed-cache'); ?></h3> <?php $ajaxUrl = $__crawler->json_path(); if ($ajaxUrl) : ?> <input type="button" id="litespeed-crawl-url-btn" value="<?php echo __('Show crawler status', 'litespeed-cache'); ?>" class="button button-secondary" data-url="<?php echo $ajaxUrl; ?>" /> <div class="litespeed-shell litespeed-hide"> <div class="litespeed-shell-header-bar"></div> <div class="litespeed-shell-header"> <div class="litespeed-shell-header-bg"></div> <div class="litespeed-shell-header-icon-container"> <img id="litespeed-shell-icon" src="<?php echo LSWCP_PLUGIN_URL . 'assets/img/Litespeed.icon.svg'; ?>" /> </div> </div> <ul class="litespeed-shell-body"> <li>Start watching...</li> <li id="litespeed-loading-dot"></li> </ul> </div> <?php else : ?> <p> <?php echo __('No crawler meta file generated yet', 'litespeed-cache'); ?> </p> <?php endif; ?>PK �}\Pe(�n n crawler/blacklist.tpl.phpnu �[��� <?php namespace LiteSpeed; defined( 'WPINC' ) || exit; $crawler_summary = Crawler::get_summary(); $__map = Crawler_Map::cls(); $list = $__map->list_blacklist( 30 ); $count = $__map->count_blacklist(); $pagination = Utility::pagination( $count, 30 ); ?> <p class="litespeed-right"> <a href="<?php echo Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_BLACKLIST_EMPTY ); ?>" class="button litespeed-btn-warning" data-litespeed-cfm="<?php echo __( 'Are you sure to delete all existing blocklist items?', 'litespeed-cache' ) ; ?>" > <?php echo __( 'Empty blocklist', 'litespeed-cache' ); ?> </a> </p> <h3 class="litespeed-title"> <?php echo __( 'Blocklist', 'litespeed-cache' ); ?> <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/crawler/#blacklist-tab' ); ?> </h3> <?php echo __( 'Total', 'litespeed-cache' ) . ': ' . $count; ?> <?php echo $pagination; ?> <div class="litespeed-table-responsive"> <table class="wp-list-table widefat striped"> <thead><tr > <th scope="col">#</th> <th scope="col"><?php echo __( 'URL', 'litespeed-cache' ); ?></th> <th scope="col"><?php echo __( 'Status', 'litespeed-cache' ); ?></th> <th scope="col"><?php echo __( 'Operation', 'litespeed-cache' ); ?></th> </tr></thead> <tbody> <?php foreach ( $list as $i => $v ) : ?> <tr> <td><?php echo $i + 1; ?></td> <td> <?php echo $v[ 'url' ]; ?> </td> <td> <?php echo Crawler::cls()->display_status( $v[ 'res' ], $v[ 'reason' ] ); ?> </td> <td> <a href="<?php echo Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_BLACKLIST_DEL, false, null, array( 'id' => $v[ 'id' ] ) ); ?>" class="button button-secondary"><?php echo __( 'Remove from Blocklist', 'litespeed-cache' ); ?></a> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php echo $pagination; ?> <p> <font class="litespeed-success">API: <?php echo sprintf( __( 'PHP Constant %s available to disable blocklist.', 'litespeed-cache' ), "<code>LITESPEED_CRAWLER_DISABLE_BLOCKLIST</code>" ); ?></font> </p> <p> <font class="litespeed-success">API: <?php echo sprintf( __( 'Filter %s available to disable blocklist.', 'litespeed-cache' ), "<code>add_filter( 'litespeed_crawler_disable_blocklist', '__return_true' );</code>" ); ?></font> </p> <p> <i class="litespeed-dot litespeed-bg-default"></i> = <?php echo __( 'Not blocklisted', 'litespeed-cache' ); ?><br> <i class="litespeed-dot litespeed-bg-warning"></i> = <?php echo __( 'Blocklisted due to not cacheable', 'litespeed-cache' ); ?><br> <i class="litespeed-dot litespeed-bg-danger"></i> = <?php echo __( 'Blocklisted', 'litespeed-cache' ); ?><br> </p> PK �}\�IoNY Y esi.tpl.phpnu �[��� <?php defined( 'WPINC' ) || exit ; ?> <?php \LiteSpeed\ESI::cls()->load_esi_block() ; PK �}\E�U� � inc/metabox.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); wp_nonce_field(self::POST_NONCE_ACTION, Router::NONCE); $post_id = get_the_ID(); foreach ($this->_postmeta_settings as $k => $v) { $existing_val = get_post_meta($post_id, $k, true); if (in_array($k, array('litespeed_vpi_list', 'litespeed_vpi_list_mobile'))) { if (is_array($existing_val)) { $existing_val = implode(PHP_EOL, $existing_val); } echo '<div style="margin-bottom:10px;"><label for="' . Str::trim_quotes($k) . '">' . $v . '</label>'; echo '<textarea style="width:100%" rows="5" id="' . Str::trim_quotes($k) . '" name="' . Str::trim_quotes($k) . '">' . $existing_val . '</textarea>'; echo '</div>'; } else { echo '<div style="display:flex;margin-bottom:10px;align-items: center;gap: 2ch;justify-content: space-between;"><label for="' . $k . '">' . $v . '</label>'; echo '<input class="litespeed-tiny-toggle" id="' . Str::trim_quotes($k) . '" name="' . Str::trim_quotes($k) . '" type="checkbox" value="1" ' . ($existing_val ? 'checked' : '') . ' />'; echo '</div>'; } } echo '<div style="text-align:right;">'; Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/metabox/'); echo '</div>'; PK �}\ 'όo o $ inc/check_if_network_disable_all.phpnu �[��� <?php namespace LiteSpeed; defined( 'WPINC' ) || exit; if ( ! is_multisite() ) { return; } if ( get_current_blog_id() === BLOG_ID_CURRENT_SITE ) { return; } if ( ! $this->network_conf( Base::NETWORK_O_USE_PRIMARY ) ) { return; } ?> <div class="litespeed-callout notice notice-error inline"> <h4><?php echo __( 'WARNING', 'litespeed-cache' ); ?></h4> <p> <?php echo __('The network admin selected use primary site configs for all subsites.', 'litespeed-cache'); ?> <?php echo __('The following options are selected, but are not editable in this settings page.', 'litespeed-cache'); ?> </p> </div> PK �}\[�p� � inc/modal.header.phpnu �[��� <?php namespace LiteSpeed ; defined( 'WPINC' ) || exit ; ?> <link rel="stylesheet" href="<?php echo LSWCP_PLUGIN_URL ; ?>assets/css/litespeed.css" /> <div class="litespeed litespeed-modal"> <?php if ( $_progress ) : ?> <div class="litespeed-progress"> <div class="litespeed-progress-bar" role="progressbar" style="width: <?php echo $_progress ; ?>%" aria-valuenow="<?php echo $_progress ; ?>" aria-valuemin="0" aria-valuemax="100"></div> </div> <?php endif ; ?> <div class="litespeed-wrap"> PK �}\���( inc/disabled_all.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); $err = __('Disable All Features', 'litespeed-cache'); // other plugin left cache expired rules in .htaccess which will cause conflicts echo Admin_Display::build_notice(Admin_Display::NOTICE_RED, $err); PK �}\k+^�$ $ inc/admin_footer.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); // ✮✮✮✮✮ $stars = '<span class="wporg-ratings rating-stars"><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span></span>'; $rate_us = '<a href="https://wordpress.org/support/plugin/litespeed-cache/reviews/?filter=5#new-post" rel="noopener noreferer" target="_blank">' . sprintf(__('Rate %s on %s', 'litespeed-cache'), '<strong>' . __('LiteSpeed Cache', 'litespeed-cache') . $stars . '</strong>', 'WordPress.org') . '</a>'; $wiki = '<a href="https://docs.litespeedtech.com/lscache/lscwp/" target="_blank">' . __('Read LiteSpeed Documentation', 'litespeed-cache') . '</a>'; $forum = '<a href="https://wordpress.org/support/plugin/litespeed-cache" target="_blank">' . __('Visit LSCWP support forum', 'litespeed-cache') . '</a>'; $community = '<a href="https://litespeedtech.com/slack" target="_blank">' . __('Join LiteSpeed Slack community', 'litespeed-cache') . '</a>'; // Change the footer text if (!is_multisite() || is_network_admin()) { $footer_text = $rate_us . ' | ' . $wiki . ' | ' . $forum . ' | ' . $community; } else { $footer_text = $wiki . ' | ' . $forum . ' | ' . $community; } PK �}\��z inc/modal.footer.phpnu �[��� </div> <?php // PK �}\�{Eu� � inc/in_upgrading.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); $msg = __('LiteSpeed cache plugin upgraded. Please refresh the page to complete the configuration data upgrade.', 'litespeed-cache'); echo self::build_notice(self::NOTICE_BLUE, $msg); PK �}\]F�<X X inc/show_display_installed.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); $buf = '<h3>' . __('LiteSpeed Cache plugin is installed!', 'litespeed-cache') . '</h3>' . ' ' . __('This message indicates that the plugin was installed by the server admin.', 'litespeed-cache') . ' ' . __('The LiteSpeed Cache plugin is used to cache pages - a simple way to improve the performance of the site.', 'litespeed-cache') . ' ' . __('However, there is no way of knowing all the possible customizations that were implemented.', 'litespeed-cache') . ' ' . __('For that reason, please test the site to make sure everything still functions properly.', 'litespeed-cache') . '<br /><br />' . __('Examples of test cases include:', 'litespeed-cache') . '<ul>' . '<li>' . __('Visit the site while logged out.', 'litespeed-cache') . '</li>' . '<li>' . __('Create a post, make sure the front page is accurate.', 'litespeed-cache') . '</li>' . '</ul>' . sprintf( __('If there are any questions, the team is always happy to answer any questions on the <a %s>support forum</a>.', 'litespeed-cache'), 'href="https://wordpress.org/support/plugin/litespeed-cache" rel="noopener noreferrer" target="_blank"' ) . '<br />' . __('If you would rather not move at litespeed, you can deactivate this plugin.', 'litespeed-cache'); self::add_notice(self::NOTICE_BLUE . ' lscwp-whm-notice', $buf); PK �}\���: : inc/check_cache_disabled.phpnu �[��� <?php namespace LiteSpeed ; defined( 'WPINC' ) || exit ; $reasons = array() ; if ( ! defined( 'LITESPEED_ALLOWED' ) ) { if ( defined( 'LITESPEED_SERVER_TYPE' ) && LITESPEED_SERVER_TYPE == 'NONE' ) { $reasons[] = array( 'title' => __( 'To use the caching functions you must have a LiteSpeed web server or be using QUIC.cloud CDN.', 'litespeed-cache' ), 'link' => 'https://docs.litespeedtech.com/lscache/lscwp/faq/#why-do-the-cache-features-require-a-litespeed-server', ) ; } else { $reasons[] = array( 'title' => __( 'Please enable the LSCache Module at the server level, or ask your hosting provider.', 'litespeed-cache' ), 'link' => 'https://docs.litespeedtech.com/lscache/lscwp/#server-level-prerequisites', ) ; } } elseif ( ! defined( 'LITESPEED_ON' ) ) { $reasons[] = array( 'title' => __( 'Please enable LiteSpeed Cache in the plugin settings.', 'litespeed-cache' ) , 'link' => 'https://docs.litespeedtech.com/lscache/lscwp/cache/#enable-cache', ) ; } if ( $reasons ) : ?> <div class="litespeed-callout notice notice-error inline"> <h4><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?></h4> <p> <?php echo __( 'LSCache caching functions on this page are currently unavailable!', 'litespeed-cache' ) ; ?> </p> <ul class="litespeed-list"> <?php foreach ( $reasons as $v ) : ?> <li> <?php echo esc_html( $v[ 'title' ] ); ?> <a href="<?php echo $v[ 'link' ] ; ?>" target="_blank" class="litespeed-learn-more"><?php echo __( 'Learn More', 'litespeed-cache' ) ; ?></a> </li> <?php endforeach ; ?> </ul> </div> <?php endif ; PK �}\��� � inc/show_error_cookie.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); $err = __('NOTICE: Database login cookie did not match your login cookie.', 'litespeed-cache') . ' ' . __('If the login cookie was recently changed in the settings, please log out and back in.', 'litespeed-cache') . ' ' . sprintf(__('If not, please verify the setting in the <a href="%1$s">Advanced tab</a>.', 'litespeed-cache'), admin_url('admin.php?page=litespeed-cache#advanced')); if (LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_OLS') { $err .= ' ' . __('If using OpenLiteSpeed, the server must be restarted once for the changes to take effect.', 'litespeed-cache'); } self::add_notice(self::NOTICE_YELLOW, $err); PK �}\�Әү � inc/show_rule_conflict.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit(); $err = sprintf( __( 'Unexpected cache rule %2$s found in %1$s file. This rule may cause visitors to see old versions of pages due to the browser caching HTML pages. If you are sure that HTML pages are not being browser cached, this message can be dismissed. (<a %3$s>Learn More</a>)', 'litespeed-cache' ), '.htaccess', '`ExpiresDefault`', 'href="https://docs.litespeedtech.com/lscache/lscwp/troubleshoot/#browser-displays-stale-content" target="_blank"' ); // other plugin left cache expired rules in .htaccess which will cause conflicts echo self::build_notice(self::NOTICE_YELLOW . ' lscwp-notice-ruleconflict', $err); PK �}\ ���� � ) general/settings_inc.auto_upgrade.tpl.phpnu �[��� <?php namespace LiteSpeed; defined( 'WPINC' ) || exit; ?> <!-- build_setting_auto_upgrade --> <tr> <th> <?php $id = Base::O_AUTO_UPGRADE; ?> <?php $this->title( $id ); ?> </th> <td> <?php $this->build_switch( $id ); ?> <div class="litespeed-desc"> <?php echo __( 'Turn this option ON to have LiteSpeed Cache updated automatically, whenever a new version is released. If OFF, update manually as usual.', 'litespeed-cache' ); ?> </div> </td> </tr> PK �}\�Cʥ � general/entry.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $menu_list = array( 'online' => __('Online Services', 'litespeed-cache'), 'settings' => __('General Settings', 'litespeed-cache'), 'settings_tuning' => __('Tuning', 'litespeed-cache'), ); if ($this->_is_network_admin) { $menu_list = array( 'network_settings' => __('General Settings', 'litespeed-cache'), ); } ?> <div class="wrap"> <h1 class="litespeed-h1"> <?php echo __('LiteSpeed Cache General 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 ($menu_list 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 // include all tpl for faster UE foreach ($menu_list as $tab => $val) { echo "<div data-litespeed-layout='$tab'>"; require LSCWP_DIR . "tpl/general/$tab.tpl.php"; echo "</div>"; } ?> </div> </div>PK �}\� �p p general/settings.tpl.phpnu �[��� <?php namespace LiteSpeed; defined('WPINC') || exit; $__cloud = Cloud::cls(); $cloud_summary = Cloud::get_summary(); $this->form_action(); ?> <h3 class="litespeed-title-short"> <?php echo __('General Settings', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/general/'); ?> </h3> <table class="wp-list-table striped litespeed-table"> <tbody> <?php if (!$this->_is_multisite) : ?> <?php require LSCWP_DIR . 'tpl/general/settings_inc.auto_upgrade.tpl.php'; ?> <?php endif; ?> <?php if (!$this->_is_multisite) : ?> <?php require LSCWP_DIR . 'tpl/general/settings_inc.guest.tpl.php'; ?> <?php endif; ?> <tr> <th> <?php $id = Base::O_GUEST_OPTM; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <span class="litespeed-danger litespeed-text-bold"> 🚨 <?php echo __('This option enables maximum optimization for Guest Mode visitors.', 'litespeed-cache'); ?> <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/general/#guest-optimization', __('Please read all warnings before enabling this option.', 'litespeed-cache'), false, 'litespeed-danger'); ?> </span> <?php $typeList = array(); if ($this->conf(Base::O_GUEST) && !$this->conf(Base::O_OPTM_UCSS)) { $typeList[] = 'UCSS'; } if ($this->conf(Base::O_GUEST) && !$this->conf(Base::O_OPTM_CSS_ASYNC)) { $typeList[] = 'CCSS'; } if (!empty($typeList)) { $theType = implode('/', $typeList); echo '<br />'; echo '<font class="litespeed-info">'; echo '⚠️ ' . sprintf(__('Your %1s quota on %2s will still be in use.', 'litespeed-cache'), $theType, 'QUIC.cloud'); echo '</font>'; } ?> <?php if (!$this->conf(Base::O_GUEST)) : ?> <br /> <font class="litespeed-warning litespeed-left10"> ⚠️ <?php echo __('Notice', 'litespeed-cache'); ?>: <?php echo sprintf(__('%s must be turned ON for this setting to work.', 'litespeed-cache'), '<code>' . Lang::title(Base::O_GUEST) . '</code>'); ?> </font> <?php endif; ?> <?php if (!$this->conf(Base::O_CACHE_MOBILE)) : ?> <br /> <font class="litespeed-primary litespeed-left10"> ⚠️ <?php echo __('Notice', 'litespeed-cache'); ?>: <?php echo sprintf(__('You need to turn %s on to get maximum result.', 'litespeed-cache'), '<code>' . Lang::title(Base::O_CACHE_MOBILE) . '</code>'); ?> </font> <?php endif; ?> <?php if (!$this->conf(Base::O_IMG_OPTM_WEBP)) : ?> <br /> <font class="litespeed-primary litespeed-left10"> ⚠️ <?php echo __('Notice', 'litespeed-cache'); ?>: <?php echo sprintf(__('You need to turn %s on and finish all WebP generation to get maximum result.', 'litespeed-cache'), '<code>' . Lang::title(Base::O_IMG_OPTM_WEBP) . '</code>'); ?> </font> <?php endif; ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_SERVER_IP; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_input($id); ?> <div class="litespeed-desc"> <?php echo __('Enter this site\'s IP address to allow cloud services directly call IP instead of domain name. This eliminates the overhead of DNS and CDN lookups.', 'litespeed-cache'); ?> <br /><?php echo __('Your server IP', 'litespeed-cache'); ?>: <code id='litespeed_server_ip'>-</code> <a href="javascript:;" class="button button-link" id="litespeed_get_ip"><?php echo __('Check my public IP from', 'litespeed-cache'); ?> CyberPanel.sh</a> ⚠️ <?php echo __('Notice', 'litespeed-cache'); ?>: <?php echo __('the auto-detected IP may not be accurate if you have an additional outgoing IP set, or you have multiple IPs configured on your server.', 'litespeed-cache'); ?> <br /><?php echo __('Please make sure this IP is the correct one for visiting your site.', 'litespeed-cache'); ?> <?php $this->_validate_ip($id); ?> </div> </td> </tr> <tr> <th> <?php $id = Base::O_NEWS; ?> <?php $this->title($id); ?> </th> <td> <?php $this->build_switch($id); ?> <div class="litespeed-desc"> <?php echo __('Turn this option ON to show latest news automatically, including hotfixes, new releases, available beta versions, and promotions.', 'litespeed-cache'); ?> </div> </td> </tr> </tbody> </table> <?php $this->form_end(); ?>PK �}\H�m-m m "