Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/litespee.../tpl/crawler
File: settings.tpl.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* LiteSpeed Cache Crawler General Settings
[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
$this->form_action();
[12] Fix | Delete
?>
[13] Fix | Delete
[14] Fix | Delete
<h3 class="litespeed-title-short">
[15] Fix | Delete
<?php esc_html_e( 'Crawler General Settings', 'litespeed-cache' ); ?>
[16] Fix | Delete
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/crawler/#general-settings-tab' ); ?>
[17] Fix | Delete
</h3>
[18] Fix | Delete
[19] Fix | Delete
<table class="wp-list-table striped litespeed-table">
[20] Fix | Delete
<tbody>
[21] Fix | Delete
<tr>
[22] Fix | Delete
<th>
[23] Fix | Delete
<?php $option_id = Base::O_CRAWLER; ?>
[24] Fix | Delete
<?php $this->title( $option_id ); ?>
[25] Fix | Delete
</th>
[26] Fix | Delete
<td>
[27] Fix | Delete
<?php $this->build_switch( $option_id ); ?>
[28] Fix | Delete
<div class="litespeed-desc">
[29] Fix | Delete
<?php esc_html_e( 'This will enable crawler cron.', 'litespeed-cache' ); ?>
[30] Fix | Delete
<br><?php Doc::notice_htaccess(); ?>
[31] Fix | Delete
</div>
[32] Fix | Delete
</td>
[33] Fix | Delete
</tr>
[34] Fix | Delete
[35] Fix | Delete
<tr>
[36] Fix | Delete
<th>
[37] Fix | Delete
<?php $option_id = Base::O_CRAWLER_CRAWL_INTERVAL; ?>
[38] Fix | Delete
<?php $this->title( $option_id ); ?>
[39] Fix | Delete
</th>
[40] Fix | Delete
<td>
[41] Fix | Delete
<?php $this->build_input( $option_id ); ?> <?php esc_html_e( 'seconds', 'litespeed-cache' ); ?>
[42] Fix | Delete
<div class="litespeed-desc">
[43] Fix | Delete
<?php esc_html_e( 'Specify how long in seconds before the crawler should initiate crawling the entire sitemap again.', 'litespeed-cache' ); ?>
[44] Fix | Delete
<?php $this->recommended( $option_id ); ?>
[45] Fix | Delete
</div>
[46] Fix | Delete
</td>
[47] Fix | Delete
</tr>
[48] Fix | Delete
[49] Fix | Delete
<tr>
[50] Fix | Delete
<th>
[51] Fix | Delete
<?php $option_id = Base::O_CRAWLER_SITEMAP; ?>
[52] Fix | Delete
<?php $this->title( $option_id ); ?>
[53] Fix | Delete
</th>
[54] Fix | Delete
<td>
[55] Fix | Delete
<?php $this->build_textarea( $option_id ); ?>
[56] Fix | Delete
<div class="litespeed-desc">
[57] Fix | Delete
<?php esc_html_e( 'The crawler will use your XML sitemap or sitemap index. Enter the full URL to your sitemap here.', 'litespeed-cache' ); ?>
[58] Fix | Delete
<?php Doc::one_per_line(); ?>
[59] Fix | Delete
</div>
[60] Fix | Delete
</td>
[61] Fix | Delete
</tr>
[62] Fix | Delete
[63] Fix | Delete
<tr>
[64] Fix | Delete
<th>
[65] Fix | Delete
<?php $option_id = Base::O_CRAWLER_LOAD_LIMIT; ?>
[66] Fix | Delete
<?php $this->title( $option_id ); ?>
[67] Fix | Delete
</th>
[68] Fix | Delete
<td>
[69] Fix | Delete
<?php $this->build_input( $option_id ); ?>
[70] Fix | Delete
<div class="litespeed-desc">
[71] Fix | Delete
<?php esc_html_e( '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' ); ?>
[72] Fix | Delete
<?php if ( ! empty( $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) : ?>
[73] Fix | Delete
<span class="litespeed-warning">
[74] Fix | Delete
<?php esc_html_e( 'NOTE', 'litespeed-cache' ); ?>:
[75] Fix | Delete
<?php
[76] Fix | Delete
printf(
[77] Fix | Delete
esc_html__( 'Server enforced value: %s', 'litespeed-cache' ),
[78] Fix | Delete
'<code>' . esc_html( sanitize_text_field( wp_unslash( $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) ) . '</code>'
[79] Fix | Delete
);
[80] Fix | Delete
?>
[81] Fix | Delete
</span>
[82] Fix | Delete
<?php elseif ( ! empty( $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT ] ) ) : ?>
[83] Fix | Delete
<span class="litespeed-warning">
[84] Fix | Delete
<?php esc_html_e( 'NOTE', 'litespeed-cache' ); ?>:
[85] Fix | Delete
<?php
[86] Fix | Delete
printf(
[87] Fix | Delete
esc_html__( 'Server allowed max value: %s', 'litespeed-cache' ),
[88] Fix | Delete
'<code>' . esc_html( sanitize_text_field( wp_unslash( $_SERVER[ Base::ENV_CRAWLER_LOAD_LIMIT ] ) ) ) . '</code>'
[89] Fix | Delete
);
[90] Fix | Delete
?>
[91] Fix | Delete
</span>
[92] Fix | Delete
<?php endif; ?>
[93] Fix | Delete
<br>
[94] Fix | Delete
<?php $this->_api_env_var( Base::ENV_CRAWLER_LOAD_LIMIT, Base::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ); ?>
[95] Fix | Delete
</div>
[96] Fix | Delete
</td>
[97] Fix | Delete
</tr>
[98] Fix | Delete
[99] Fix | Delete
<tr>
[100] Fix | Delete
<th>
[101] Fix | Delete
<?php $option_id = Base::O_CRAWLER_ROLES; ?>
[102] Fix | Delete
<?php $this->title( $option_id ); ?>
[103] Fix | Delete
</th>
[104] Fix | Delete
<td>
[105] Fix | Delete
<?php $this->build_textarea( $option_id, 20 ); ?>
[106] Fix | Delete
<div class="litespeed-desc">
[107] Fix | Delete
<?php esc_html_e( 'To crawl the site as a logged-in user, enter the user ids to be simulated.', 'litespeed-cache' ); ?>
[108] Fix | Delete
<?php Doc::one_per_line(); ?>
[109] Fix | Delete
<?php if ( empty( $this->conf( Base::O_SERVER_IP ) ) ) : ?>
[110] Fix | Delete
<div class="litespeed-danger litespeed-text-bold">
[111] Fix | Delete
🚨 <?php esc_html_e( 'NOTICE', 'litespeed-cache' ); ?>:
[112] Fix | Delete
<?php
[113] Fix | Delete
printf(
[114] Fix | Delete
esc_html__( 'You must set %s before using this feature.', 'litespeed-cache' ),
[115] Fix | Delete
esc_html( Lang::title( Base::O_SERVER_IP ) )
[116] Fix | Delete
);
[117] Fix | Delete
?>
[118] Fix | Delete
<?php
[119] Fix | Delete
Doc::learn_more(
[120] Fix | Delete
esc_url( admin_url( 'admin.php?page=litespeed-general#settings' ) ),
[121] Fix | Delete
esc_html__( 'Click here to set.', 'litespeed-cache' ),
[122] Fix | Delete
true,
[123] Fix | Delete
false,
[124] Fix | Delete
true
[125] Fix | Delete
);
[126] Fix | Delete
?>
[127] Fix | Delete
</div>
[128] Fix | Delete
<?php endif; ?>
[129] Fix | Delete
<?php if ( empty( $this->conf( Base::O_ESI ) ) ) : ?>
[130] Fix | Delete
<div class="litespeed-danger litespeed-text-bold">
[131] Fix | Delete
🚨 <?php esc_html_e( 'NOTICE', 'litespeed-cache' ); ?>:
[132] Fix | Delete
<?php
[133] Fix | Delete
printf(
[134] Fix | Delete
esc_html__( 'You must set %1$s to %2$s before using this feature.', 'litespeed-cache' ),
[135] Fix | Delete
esc_html( Lang::title( Base::O_ESI ) ),
[136] Fix | Delete
esc_html__( 'ON', 'litespeed-cache' )
[137] Fix | Delete
);
[138] Fix | Delete
?>
[139] Fix | Delete
<?php
[140] Fix | Delete
Doc::learn_more(
[141] Fix | Delete
esc_url( admin_url( 'admin.php?page=litespeed-cache#esi' ) ),
[142] Fix | Delete
esc_html__( 'Click here to set.', 'litespeed-cache' ),
[143] Fix | Delete
true,
[144] Fix | Delete
false,
[145] Fix | Delete
true
[146] Fix | Delete
);
[147] Fix | Delete
?>
[148] Fix | Delete
</div>
[149] Fix | Delete
<?php endif; ?>
[150] Fix | Delete
</div>
[151] Fix | Delete
</td>
[152] Fix | Delete
</tr>
[153] Fix | Delete
[154] Fix | Delete
<tr>
[155] Fix | Delete
<th>
[156] Fix | Delete
<?php $option_id = Base::O_CRAWLER_COOKIES; ?>
[157] Fix | Delete
<?php $this->title( $option_id ); ?>
[158] Fix | Delete
</th>
[159] Fix | Delete
<td>
[160] Fix | Delete
<?php $this->enroll( $option_id . '[name][]' ); ?>
[161] Fix | Delete
<?php $this->enroll( $option_id . '[vals][]' ); ?>
[162] Fix | Delete
<div id="litespeed_crawler_simulation_div"></div>
[163] Fix | Delete
<script type="text/babel">
[164] Fix | Delete
ReactDOM.render(
[165] Fix | Delete
<CrawlerSimulate list={ <?php echo wp_json_encode( $this->conf( $option_id ) ); ?> } />,
[166] Fix | Delete
document.getElementById( 'litespeed_crawler_simulation_div' )
[167] Fix | Delete
);
[168] Fix | Delete
</script>
[169] Fix | Delete
<div class="litespeed-desc">
[170] Fix | Delete
<?php esc_html_e( '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' ); ?>
[171] Fix | Delete
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/crawler/#cookie-simulation' ); ?>
[172] Fix | Delete
<p>
[173] Fix | Delete
<?php
[174] Fix | Delete
printf(
[175] Fix | Delete
esc_html__( 'Use %1$s in %2$s to indicate this cookie has not been set.', 'litespeed-cache' ),
[176] Fix | Delete
'<code>_null</code>',
[177] Fix | Delete
esc_html__( 'Cookie Values', 'litespeed-cache' )
[178] Fix | Delete
);
[179] Fix | Delete
?>
[180] Fix | Delete
</p>
[181] Fix | Delete
</div>
[182] Fix | Delete
</td>
[183] Fix | Delete
</tr>
[184] Fix | Delete
</tbody>
[185] Fix | Delete
</table>
[186] Fix | Delete
[187] Fix | Delete
<?php $this->form_end(); ?>
[188] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function