Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/litespee.../tpl/crawler
File: map.tpl.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* LiteSpeed Cache Crawler Sitemap List
[2] Fix | Delete
*
[3] Fix | Delete
* @package LiteSpeed
[4] Fix | Delete
* @since 1.0.0
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
namespace LiteSpeed;
[8] Fix | Delete
[9] Fix | Delete
defined( 'WPINC' ) || exit;
[10] Fix | Delete
[11] Fix | Delete
$crawler_summary = Crawler::get_summary();
[12] Fix | Delete
$__map = Crawler_Map::cls();
[13] Fix | Delete
$list = $__map->list_map( 30 );
[14] Fix | Delete
$count = $__map->count_map();
[15] Fix | Delete
$pagination = Utility::pagination( $count, 30 );
[16] Fix | Delete
$kw = '';
[17] Fix | Delete
if (! empty( $_POST['kw'] ) && ! empty( $_POST['_wpnonce'] )) {
[18] Fix | Delete
$nonce = sanitize_text_field(wp_unslash($_POST['_wpnonce']));
[19] Fix | Delete
if (wp_verify_nonce($nonce)) {
[20] Fix | Delete
$kw = sanitize_text_field(wp_unslash($_POST['kw']));
[21] Fix | Delete
}
[22] Fix | Delete
}
[23] Fix | Delete
?>
[24] Fix | Delete
[25] Fix | Delete
<p class="litespeed-right">
[26] Fix | Delete
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_EMPTY ) ); ?>" class="button litespeed-btn-warning">
[27] Fix | Delete
<?php esc_html_e( 'Clean Crawler Map', 'litespeed-cache' ); ?>
[28] Fix | Delete
</a>
[29] Fix | Delete
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_REFRESH_MAP ) ); ?>" class="button button-secondary">
[30] Fix | Delete
<?php esc_html_e( 'Refresh Crawler Map', 'litespeed-cache' ); ?>
[31] Fix | Delete
</a>
[32] Fix | Delete
</p>
[33] Fix | Delete
[34] Fix | Delete
<p>
[35] Fix | Delete
<?php
[36] Fix | Delete
if ( ! empty( $crawler_summary['sitemap_time'] ) ) {
[37] Fix | Delete
printf(
[38] Fix | Delete
esc_html__( 'Generated at %s', 'litespeed-cache' ),
[39] Fix | Delete
esc_html( Utility::readable_time( $crawler_summary['sitemap_time'] ) )
[40] Fix | Delete
);
[41] Fix | Delete
}
[42] Fix | Delete
?>
[43] Fix | Delete
</p>
[44] Fix | Delete
[45] Fix | Delete
<h3 class="litespeed-title">
[46] Fix | Delete
<?php esc_html_e( 'Sitemap List', 'litespeed-cache' ); ?>
[47] Fix | Delete
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/crawler/#map-tab' ); ?>
[48] Fix | Delete
</h3>
[49] Fix | Delete
[50] Fix | Delete
<?php echo esc_html__( 'Sitemap Total', 'litespeed-cache' ) . ': ' . esc_html( $count ); ?>
[51] Fix | Delete
[52] Fix | Delete
<div style="display: flex; justify-content: space-between;">
[53] Fix | Delete
<div style="margin-top:10px;">
[54] Fix | Delete
<form action="<?php echo esc_url( admin_url( 'admin.php?page=litespeed-crawler' ) ); ?>" method="post">
[55] Fix | Delete
<?php wp_nonce_field(); ?>
[56] Fix | Delete
<input type="text" name="kw" value="<?php echo esc_attr( $kw ); ?>" placeholder="<?php esc_attr_e( 'URL Search', 'litespeed-cache' ); ?>" style="width: 600px;" />
[57] Fix | Delete
</form>
[58] Fix | Delete
</div>
[59] Fix | Delete
<div>
[60] Fix | Delete
<a style="padding-right:10px;" href="<?php echo esc_url( admin_url( 'admin.php?page=litespeed-crawler&' . Router::TYPE . '=hit' ) ); ?>"><?php esc_html_e( 'Cache Hit', 'litespeed-cache' ); ?></a>
[61] Fix | Delete
<a style="padding-right:10px;" href="<?php echo esc_url( admin_url( 'admin.php?page=litespeed-crawler&' . Router::TYPE . '=miss' ) ); ?>"><?php esc_html_e( 'Cache Miss', 'litespeed-cache' ); ?></a>
[62] Fix | Delete
<a style="padding-right:10px;" href="<?php echo esc_url( admin_url( 'admin.php?page=litespeed-crawler&' . Router::TYPE . '=blacklisted' ) ); ?>"><?php esc_html_e( 'Blocklisted', 'litespeed-cache' ); ?></a>
[63] Fix | Delete
</div>
[64] Fix | Delete
<div>
[65] Fix | Delete
<?php echo wp_kses_post( $pagination ); ?>
[66] Fix | Delete
</div>
[67] Fix | Delete
</div>
[68] Fix | Delete
[69] Fix | Delete
<div class="litespeed-table-responsive">
[70] Fix | Delete
<table class="wp-list-table widefat striped">
[71] Fix | Delete
<thead>
[72] Fix | Delete
<tr>
[73] Fix | Delete
<th scope="col">#</th>
[74] Fix | Delete
<th scope="col"><?php esc_html_e( 'URL', 'litespeed-cache' ); ?></th>
[75] Fix | Delete
<th scope="col"><?php esc_html_e( 'Crawler Status', 'litespeed-cache' ); ?></th>
[76] Fix | Delete
<th scope="col"><?php esc_html_e( 'Operation', 'litespeed-cache' ); ?></th>
[77] Fix | Delete
</tr>
[78] Fix | Delete
</thead>
[79] Fix | Delete
<tbody>
[80] Fix | Delete
<?php foreach ( $list as $i => $v ) : ?>
[81] Fix | Delete
<tr>
[82] Fix | Delete
<td><?php echo esc_html( $i + 1 ); ?></td>
[83] Fix | Delete
<td><?php echo esc_html( $v['url'] ); ?></td>
[84] Fix | Delete
<td><?php echo wp_kses_post( Crawler::cls()->display_status( $v['res'], $v['reason'] ) ); ?></td>
[85] Fix | Delete
<td>
[86] Fix | Delete
<a href="<?php echo esc_url( Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_BLACKLIST_ADD, false, null, array( 'id' => $v['id'] ) ) ); ?>" class="button button-secondary">
[87] Fix | Delete
<?php esc_html_e( 'Add to Blocklist', 'litespeed-cache' ); ?>
[88] Fix | Delete
</a>
[89] Fix | Delete
</td>
[90] Fix | Delete
</tr>
[91] Fix | Delete
<?php endforeach; ?>
[92] Fix | Delete
</tbody>
[93] Fix | Delete
</table>
[94] Fix | Delete
</div>
[95] Fix | Delete
[96] Fix | Delete
<?php echo wp_kses_post( $pagination ); ?>
[97] Fix | Delete
[98] Fix | Delete
<p>
[99] Fix | Delete
<i class="litespeed-dot litespeed-bg-success"></i> = <?php esc_html_e( 'Cache Hit', 'litespeed-cache' ); ?><br>
[100] Fix | Delete
<i class="litespeed-dot litespeed-bg-primary"></i> = <?php esc_html_e( 'Cache Miss', 'litespeed-cache' ); ?><br>
[101] Fix | Delete
<i class="litespeed-dot litespeed-bg-warning"></i> = <?php esc_html_e( 'Blocklisted due to not cacheable', 'litespeed-cache' ); ?><br>
[102] Fix | Delete
<i class="litespeed-dot litespeed-bg-danger"></i> = <?php esc_html_e( 'Blocklisted', 'litespeed-cache' ); ?><br>
[103] Fix | Delete
</p>
[104] Fix | Delete
[105] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function