| 1 |
<?php |
| 2 |
/** |
| 3 |
* Settings Page Template |
| 4 |
* |
| 5 |
* @package PoweredCache |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace PoweredCache\Admin\Partials\SettingsPage; |
| 9 |
|
| 10 |
use function PoweredCache\Utils\can_configure_htaccess; |
| 11 |
use function PoweredCache\Utils\can_configure_object_cache; |
| 12 |
use function PoweredCache\Utils\can_control_all_settings; |
| 13 |
use function PoweredCache\Utils\cdn_zones; |
| 14 |
use function PoweredCache\Utils\get_available_object_caches; |
| 15 |
use function PoweredCache\Utils\get_db_cleanup_counts; |
| 16 |
use function PoweredCache\Utils\get_doc_url; |
| 17 |
use function PoweredCache\Utils\get_timeout_with_interval; |
| 18 |
use function PoweredCache\Utils\is_premium; |
| 19 |
use function PoweredCache\Utils\js_execution_methods; |
| 20 |
use function PoweredCache\Utils\scheduled_cleanup_frequency_options; |
| 21 |
|
| 22 |
if ( ! defined( 'ABSPATH' ) ) { |
| 23 |
exit; // Exit if accessed directly. |
| 24 |
} |
| 25 |
// phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found |
| 26 |
// phpcs:disable Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed |
| 27 |
// phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment |
| 28 |
|
| 29 |
$settings = \PoweredCache\Utils\get_settings(); |
| 30 |
|
| 31 |
?> |
| 32 |
|
| 33 |
<main class="sui-wrap"> |
| 34 |
<div class="sui-header"> |
| 35 |
<h1 class="sui-header-title"> |
| 36 |
<img width="32" alt="<?php esc_html_e( 'Powered Cache Icon', 'powered-cache' ); ?>" |
| 37 |
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGhlaWdodD0iMzJweCIgaWQ9IkxheWVyXzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHdpZHRoPSIzMnB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNDQgMzM2KSI+PHBhdGggZD0iTS0xMTcuMTc2LTMzNC4wNjNoLTkuMzUzTC0xMzguMTExLTMyMGg5LjMwNGwtMTEuNzQ1LDE0LjA2M2wyNS4xMDUtMTguMzE2aC05LjgwOUwtMTE3LjE3Ni0zMzQuMDYzeiIvPjwvZz48L3N2Zz4="> |
| 38 |
<?php esc_html_e( 'Powered Cache', 'powered-cache' ); ?> |
| 39 |
</h1> |
| 40 |
|
| 41 |
<!-- Float element to Right --> |
| 42 |
<div class="sui-actions-right"> |
| 43 |
<a href="<?php echo esc_url( get_doc_url( '/' ) ); ?>" target="_blank" class="sui-button sui-button-blue"> |
| 44 |
<i class="sui-icon-academy" aria-hidden="true"></i> |
| 45 |
<?php esc_html_e( 'Documentation', 'powered-cache' ); ?> |
| 46 |
</a> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
<?php \PoweredCache\Utils\settings_errors(); ?> |
| 50 |
|
| 51 |
<form method="post" action="" enctype="multipart/form-data"> |
| 52 |
<?php wp_nonce_field( 'powered_cache_update_settings', 'powered_cache_settings_nonce' ); ?> |
| 53 |
<section class="sui-row-with-sidenav"> |
| 54 |
|
| 55 |
<!-- Navigation --> |
| 56 |
<div class="sui-sidenav" role="navigation"> |
| 57 |
|
| 58 |
<ul class="sui-vertical-tabs"> |
| 59 |
|
| 60 |
<li class="sui-vertical-tab current"> |
| 61 |
<a href="#basic-options" role="button" data-tab="basic-options"><?php esc_html_e( 'Basic Options', 'powered-cache' ); ?></a> |
| 62 |
</li> |
| 63 |
|
| 64 |
<li class="sui-vertical-tab"> |
| 65 |
<a href="#advanced-options" role="button" data-tab="advanced-options"><?php esc_html_e( 'Advanced Options', 'powered-cache' ); ?></a> |
| 66 |
</li> |
| 67 |
|
| 68 |
<li class="sui-vertical-tab"> |
| 69 |
<a href="#file-optimization" role="button" data-tab="file-optimization"><?php esc_html_e( 'File Optimization', 'powered-cache' ); ?></a> |
| 70 |
</li> |
| 71 |
|
| 72 |
<li class="sui-vertical-tab"> |
| 73 |
<a href="#media-optimization" role="button" data-tab="media-optimization"><?php esc_html_e( 'Media Optimization', 'powered-cache' ); ?></a> |
| 74 |
</li> |
| 75 |
|
| 76 |
<li class="sui-vertical-tab"> |
| 77 |
<a href="#cdn-integration" role="button" data-tab="cdn-integration"><?php esc_html_e( 'CDN Integration', 'powered-cache' ); ?></a> |
| 78 |
</li> |
| 79 |
|
| 80 |
<li class="sui-vertical-tab"> |
| 81 |
<a href="#preload" role="button" data-tab="preload"><?php esc_html_e( 'Preload', 'powered-cache' ); ?></a> |
| 82 |
</li> |
| 83 |
|
| 84 |
<li class="sui-vertical-tab"> |
| 85 |
<a href="#db-optimization" role="button" data-tab="db-optimization"><?php esc_html_e( 'Database', 'powered-cache' ); ?></a> |
| 86 |
</li> |
| 87 |
|
| 88 |
<li class="sui-vertical-tab"> |
| 89 |
<a href="#extensions" role="button" data-tab="extensions"><?php esc_html_e( 'Extensions', 'powered-cache' ); ?></a> |
| 90 |
</li> |
| 91 |
|
| 92 |
<li class="sui-vertical-tab"> |
| 93 |
<a href="#misc-settings" role="button" data-tab="misc-settings"><?php esc_html_e( 'Misc', 'powered-cache' ); ?></a> |
| 94 |
</li> |
| 95 |
|
| 96 |
<?php |
| 97 |
/** |
| 98 |
* Fires after settings nav. Used for injecting new settings tabs.. |
| 99 |
* |
| 100 |
* @hook powered_cache_admin_page_after_settings_nav |
| 101 |
* |
| 102 |
* @since 2.0 |
| 103 |
*/ |
| 104 |
do_action( 'powered_cache_admin_page_after_settings_nav' ); |
| 105 |
?> |
| 106 |
|
| 107 |
</ul> |
| 108 |
|
| 109 |
<button type="submit" name="powered_cache_form_action" class="sui-button sui-button-blue" value="save_settings"><?php esc_html_e( 'Save Changes', 'powered-cache' ); ?></button> |
| 110 |
</div> |
| 111 |
|
| 112 |
<!-- TAB: Regular --> |
| 113 |
<div class="sui-box" id="basic-options" data-tab="basic-options" style=""> |
| 114 |
|
| 115 |
<div class="sui-box-header"> |
| 116 |
<h2 class="sui-box-title"><?php esc_html_e( 'Basic Options', 'powered-cache' ); ?></h2> |
| 117 |
</div> |
| 118 |
|
| 119 |
<div class="sui-box-body"> |
| 120 |
|
| 121 |
<!-- Page Cache settings --> |
| 122 |
<div class="sui-box-settings-row"> |
| 123 |
<div class="sui-box-settings-col-1"> |
| 124 |
<span class="sui-settings-label"><?php esc_html_e( 'Page Cache', 'powered-cache' ); ?></span> |
| 125 |
</div> |
| 126 |
|
| 127 |
<div class="sui-box-settings-col-2"> |
| 128 |
<div class="sui-form-field"> |
| 129 |
<label for="enable_page_cache" class="sui-toggle"> |
| 130 |
<input |
| 131 |
type="checkbox" |
| 132 |
id="enable_page_cache" |
| 133 |
name="enable_page_cache" |
| 134 |
aria-labelledby="enable_page_cache_label" |
| 135 |
aria-describedby="enable_page_cache_description" |
| 136 |
<?php checked( 1, $settings['enable_page_cache'] ); ?> |
| 137 |
> |
| 138 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 139 |
<span id="enable_page_cache_label" class="sui-toggle-label"><?php esc_html_e( 'Enable page cache', 'powered-cache' ); ?></span> |
| 140 |
</label> |
| 141 |
<span id="enable_page_cache_description" class="sui-description"><?php esc_html_e( 'Enable page caching that will reduce the response time of your site.', 'powered-cache' ); ?> |
| 142 |
<a href="<?php echo esc_url( get_doc_url( 'page-caching' ) ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'powered-cache' ); ?></a> |
| 143 |
</span> |
| 144 |
</div> |
| 145 |
</div> |
| 146 |
</div> |
| 147 |
|
| 148 |
<?php if ( can_configure_object_cache() ) : ?> |
| 149 |
<!-- Object Caching settings --> |
| 150 |
<div class="sui-box-settings-row"> |
| 151 |
<div class="sui-box-settings-col-1"> |
| 152 |
<span class="sui-settings-label"><?php esc_html_e( 'Object Cache', 'powered-cache' ); ?></span> |
| 153 |
<span class="sui-description"><?php esc_html_e( 'Speed up dynamic pageviews.', 'powered-cache' ); ?></span> |
| 154 |
</div> |
| 155 |
|
| 156 |
<div class="sui-box-settings-col-2"> |
| 157 |
<div class="sui-form-field"> |
| 158 |
<select id="object_cache" name="object_cache"> |
| 159 |
<option value="off" <?php selected( $settings['object_cache'], 'off' ); ?>><?php esc_html_e( 'Off', 'powered-cache' ); ?></option> |
| 160 |
<?php foreach ( get_available_object_caches() as $object_cache_backend ) : ?> |
| 161 |
<option <?php selected( $settings['object_cache'], $object_cache_backend ); ?> value="<?php echo esc_attr( $object_cache_backend ); ?>"><?php echo esc_attr( ucfirst( $object_cache_backend ) ); ?></option> |
| 162 |
<?php endforeach; ?> |
| 163 |
</select> |
| 164 |
<span id="object_cache_description" class="sui-description"><?php esc_html_e( 'You will also need to configure the object cache backend.', 'powered-cache' ); ?><a href="<?php echo esc_url( get_doc_url( 'object-caching' ) ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'powered-cache' ); ?></a></span> |
| 165 |
</div> |
| 166 |
</div> |
| 167 |
</div> |
| 168 |
<?php endif; ?> |
| 169 |
|
| 170 |
<!-- Mobile Cache settings --> |
| 171 |
<div class="sui-box-settings-row"> |
| 172 |
<div class="sui-box-settings-col-1"> |
| 173 |
<span class="sui-settings-label"><?php esc_html_e( 'Mobile Cache', 'powered-cache' ); ?></span> |
| 174 |
<span class="sui-description"><?php esc_html_e( 'Cache for mobile devices', 'powered-cache' ); ?></span> |
| 175 |
</div> |
| 176 |
|
| 177 |
<div class="sui-box-settings-col-2"> |
| 178 |
<div class="sui-form-field"> |
| 179 |
<label for="cache_mobile" class="sui-toggle"> |
| 180 |
<input type="checkbox" |
| 181 |
value="1" |
| 182 |
name="cache_mobile" |
| 183 |
id="cache_mobile" |
| 184 |
aria-controls="cache_mobile_separate_file_controls" |
| 185 |
<?php checked( 1, $settings['cache_mobile'] ); ?> |
| 186 |
> |
| 187 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 188 |
<span id="toggle-6-label" class="sui-toggle-label"><?php esc_html_e( 'Enable caching for mobile devices.', 'powered-cache' ); ?></span> |
| 189 |
</label> |
| 190 |
|
| 191 |
<div style=" <?php echo( ! $settings['cache_mobile'] ? 'display:none' : '' ); ?>" tabindex="0" id="cache_mobile_separate_file_controls"> |
| 192 |
<div class="sui-form-field"> |
| 193 |
<label for="cache_mobile_separate_file" class="sui-toggle"> |
| 194 |
<input type="checkbox" |
| 195 |
value="1" |
| 196 |
name="cache_mobile_separate_file" |
| 197 |
id="cache_mobile_separate_file" |
| 198 |
<?php checked( 1, $settings['cache_mobile_separate_file'] ); ?> |
| 199 |
> |
| 200 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 201 |
<span id="cache_mobile_separate_file_label" class="sui-toggle-label"><?php esc_html_e( 'Use separate cache file for mobile.', 'powered-cache' ); ?></span> |
| 202 |
</label> |
| 203 |
</div> |
| 204 |
</div> |
| 205 |
|
| 206 |
</div> |
| 207 |
</div> |
| 208 |
</div> |
| 209 |
|
| 210 |
<!-- Logged-in cache settings --> |
| 211 |
<div class="sui-box-settings-row"> |
| 212 |
|
| 213 |
<div class="sui-box-settings-col-1"> |
| 214 |
<span class="sui-settings-label"><?php esc_html_e( 'Logged in user cache', 'powered-cache' ); ?></span> |
| 215 |
<span class="sui-description"><?php esc_html_e( 'It creates a separate cache for each users.', 'powered-cache' ); ?></span> |
| 216 |
</div> |
| 217 |
|
| 218 |
<div class="sui-box-settings-col-2"> |
| 219 |
<div class="sui-form-field"> |
| 220 |
<label for="loggedin_user_cache" class="sui-toggle"> |
| 221 |
<input type="checkbox" |
| 222 |
value="1" |
| 223 |
name="loggedin_user_cache" |
| 224 |
id="loggedin_user_cache" |
| 225 |
<?php checked( 1, $settings['loggedin_user_cache'] ); ?> |
| 226 |
> |
| 227 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 228 |
<span id="loggedin_user_cache_label" class="sui-toggle-label"><?php esc_html_e( 'Enable caching for logged-in users', 'powered-cache' ); ?></span> |
| 229 |
<span class="sui-description"><?php esc_html_e( 'This feature is useful when you have user-specific or restricted content on your website', 'powered-cache' ); ?></span> |
| 230 |
</label> |
| 231 |
</div> |
| 232 |
</div> |
| 233 |
</div> |
| 234 |
|
| 235 |
<?php if ( function_exists( 'gzencode' ) ) : ?> |
| 236 |
<!-- Gzip compression settings --> |
| 237 |
<div class="sui-box-settings-row"> |
| 238 |
|
| 239 |
<div class="sui-box-settings-col-1"> |
| 240 |
<span class="sui-settings-label"><?php esc_html_e( 'Gzip Compression', 'powered-cache' ); ?></span> |
| 241 |
</div> |
| 242 |
<div class="sui-box-settings-col-2"> |
| 243 |
<div class="sui-form-field"> |
| 244 |
<label for="gzip_compression" class="sui-toggle"> |
| 245 |
<input type="checkbox" |
| 246 |
value="1" |
| 247 |
name="gzip_compression" |
| 248 |
id="gzip_compression" |
| 249 |
aria-labelledby="gzip_compression_label" |
| 250 |
<?php checked( 1, $settings['gzip_compression'] ); ?> |
| 251 |
> |
| 252 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 253 |
<span id="gzip_compression_label" class="sui-toggle-label"><?php esc_html_e( 'Enable gzip compression', 'powered-cache' ); ?></span> |
| 254 |
<span class="sui-description"><?php esc_html_e( 'The pages will be gzip-compressed at the PHP level when this option enabled. However, we highly recommended gzip compression on a web server, our pre-defined configurations for .htaccess and Nginx configurations come with gzip compression.', 'powered-cache' ); ?></span> |
| 255 |
</label> |
| 256 |
</div> |
| 257 |
</div> |
| 258 |
|
| 259 |
</div> |
| 260 |
<?php endif; ?> |
| 261 |
|
| 262 |
<!-- Cache Timeout --> |
| 263 |
<?php list( $cache_timeout, $selected_interval ) = get_timeout_with_interval( $settings['cache_timeout'] ); ?> |
| 264 |
<div class="sui-box-settings-row"> |
| 265 |
<div class="sui-box-settings-col-1"> |
| 266 |
<span class="sui-settings-label"><?php esc_html_e( 'Cache Timeout', 'powered-cache' ); ?></span> |
| 267 |
<span class="sui-description"><?php esc_html_e( 'The lifespan of the cached page. Expired cache purges with WP Cron.', 'powered-cache' ); ?></span> |
| 268 |
</div> |
| 269 |
<div class="sui-box-settings-col-2"> |
| 270 |
<div class="sui-form-field"> |
| 271 |
<input |
| 272 |
name="cache_timeout" |
| 273 |
id="cache_timeout" |
| 274 |
class="sui-form-control sui-field-has-suffix" |
| 275 |
min="1" |
| 276 |
type="number" |
| 277 |
value="<?php echo absint( $cache_timeout ); ?>" |
| 278 |
/> |
| 279 |
<span class="sui-field-suffix" style="margin-left:0;"> |
| 280 |
<div class="sui-form-field sui-input-md"> |
| 281 |
<select id="cache_timeout_interval" name="cache_timeout_interval" class="sui-form-control"> |
| 282 |
<option <?php selected( 'MINUTE', $selected_interval ); ?> value="MINUTE"><?php echo esc_html__( 'Minute', 'powered-cache' ); ?></option> |
| 283 |
<option <?php selected( 'HOUR', $selected_interval ); ?> value="HOUR"><?php echo esc_html__( 'Hour', 'powered-cache' ); ?></option> |
| 284 |
<option <?php selected( 'DAY', $selected_interval ); ?> value="DAY"><?php echo esc_html__( 'Day', 'powered-cache' ); ?></option> |
| 285 |
</select> |
| 286 |
</div> |
| 287 |
</span> |
| 288 |
</div> |
| 289 |
</div> |
| 290 |
</div> |
| 291 |
|
| 292 |
</div> |
| 293 |
|
| 294 |
<div class="sui-box-footer"> |
| 295 |
<div class="sui-actions-left"> |
| 296 |
<button type="submit" name="powered_cache_form_action" value="save_settings" class="sui-button sui-button-blue"> |
| 297 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 298 |
<?php esc_html_e( 'Update settings', 'powered-cache' ); ?> |
| 299 |
</button> |
| 300 |
</div> |
| 301 |
</div> |
| 302 |
|
| 303 |
</div> |
| 304 |
|
| 305 |
<!-- TAB: Advanced Options --> |
| 306 |
<div class="sui-box" id="advanced-options" data-tab="advanced-options" style="display: none"> |
| 307 |
<div class="sui-box-header"> |
| 308 |
<h2 class="sui-box-title"><?php esc_html_e( 'Advanced Options', 'powered-cache' ); ?></h2> |
| 309 |
</div> |
| 310 |
|
| 311 |
<div class="sui-box-body"> |
| 312 |
|
| 313 |
<?php if ( can_configure_htaccess() ) : ?> |
| 314 |
<!-- .htaccess settings --> |
| 315 |
<div class="sui-box-settings-row"> |
| 316 |
<div class="sui-box-settings-col-1"> |
| 317 |
<span class="sui-settings-label"><?php esc_html_e( '.htaccess Configuration', 'powered-cache' ); ?></span> |
| 318 |
</div> |
| 319 |
|
| 320 |
<div class="sui-box-settings-col-2"> |
| 321 |
<div class="sui-form-field"> |
| 322 |
<label for="auto_configure_htaccess" class="sui-toggle"> |
| 323 |
<input |
| 324 |
type="checkbox" |
| 325 |
id="auto_configure_htaccess" |
| 326 |
name="auto_configure_htaccess" |
| 327 |
aria-labelledby="auto_configure_htaccess_label" |
| 328 |
<?php checked( 1, $settings['auto_configure_htaccess'] ); ?> |
| 329 |
> |
| 330 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 331 |
<span id="auto_configure_htaccess_label" class="sui-toggle-label"><?php esc_html_e( 'Automatically configure .htaccess', 'powered-cache' ); ?></span> |
| 332 |
</label> |
| 333 |
<span class="sui-description"><?php esc_html_e( 'You are using a .htaccess compatible server. Powered Cache automatically configures .htaccess to giving the best performance when this option is enabled. Highly recommend keeping this option enabled unless you are keeping .htaccess under a version control system.', 'powered-cache' ); ?></span> |
| 334 |
</div> |
| 335 |
</div> |
| 336 |
</div> |
| 337 |
<?php endif; ?> |
| 338 |
|
| 339 |
<!-- Rejected user agents --> |
| 340 |
<div class="sui-box-settings-row"> |
| 341 |
<div class="sui-box-settings-col-1"> |
| 342 |
<span class="sui-settings-label"><?php esc_html_e( 'Rejected User Agents', 'powered-cache' ); ?></span> |
| 343 |
</div> |
| 344 |
|
| 345 |
<div class="sui-box-settings-col-2"> |
| 346 |
<div class="sui-row"> |
| 347 |
|
| 348 |
<div class="sui-col-md-8"> |
| 349 |
<div class="sui-form-field"> |
| 350 |
<label for="rejected_user_agents" class="sui-label"><i><?php esc_html_e( 'Enter rejected user agents (one per line)', 'powered-cache' ); ?></i></label> |
| 351 |
<textarea |
| 352 |
placeholder="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" |
| 353 |
id="rejected_user_agents" |
| 354 |
name="rejected_user_agents" |
| 355 |
class="sui-form-control" |
| 356 |
aria-describedby="rejected_user_agents_description" |
| 357 |
rows="5" |
| 358 |
><?php echo esc_textarea( $settings['rejected_user_agents'] ); ?></textarea> |
| 359 |
<span id="rejected_user_agents_description" class="sui-description"> |
| 360 |
<?php esc_html_e( 'Never send cached results for these user agents.', 'powered-cache' ); ?> |
| 361 |
(<a href="<?php echo esc_url( get_doc_url( '/advanced-options/', 'rejected-user-agents' ) ); ?>" target="_blank">?</a>) |
| 362 |
</span> |
| 363 |
</div> |
| 364 |
</div> |
| 365 |
</div> |
| 366 |
</div> |
| 367 |
</div> |
| 368 |
|
| 369 |
<!-- Rejected cookies --> |
| 370 |
<div class="sui-box-settings-row"> |
| 371 |
<div class="sui-box-settings-col-1"> |
| 372 |
<span class="sui-settings-label" id="rejected_cookies_label"><?php esc_html_e( 'Rejected Cookies', 'powered-cache' ); ?></span> |
| 373 |
</div> |
| 374 |
|
| 375 |
<div class="sui-box-settings-col-2"> |
| 376 |
<div class="sui-row"> |
| 377 |
<div class="sui-col-md-8"> |
| 378 |
<div class="sui-form-field"> |
| 379 |
<label for="rejected_cookies" class="sui-label"><i><?php esc_html_e( 'Enter rejected cookies (one per line)', 'powered-cache' ); ?></i></label> |
| 380 |
<textarea |
| 381 |
placeholder="wordpress_" |
| 382 |
id="rejected_cookies" |
| 383 |
name="rejected_cookies" |
| 384 |
class="sui-form-control" |
| 385 |
aria-labelledby="rejected_cookies_label" |
| 386 |
aria-describedby="rejected_cookies_description" |
| 387 |
rows="5" |
| 388 |
><?php echo esc_textarea( $settings['rejected_cookies'] ); ?></textarea> |
| 389 |
<span id="rejected_cookies_description" class="sui-description"><?php esc_html_e( 'Never cache pages that use the specified cookies.', 'powered-cache' ); ?> |
| 390 |
(<a href="<?php echo esc_url( get_doc_url( '/advanced-options/', 'rejected-cookies' ) ); ?>" target="_blank">?</a>) |
| 391 |
</span> |
| 392 |
</div> |
| 393 |
</div> |
| 394 |
</div> |
| 395 |
</div> |
| 396 |
</div> |
| 397 |
|
| 398 |
<!-- Cookie Vary --> |
| 399 |
<div class="sui-box-settings-row"> |
| 400 |
<div class="sui-box-settings-col-1"> |
| 401 |
<span class="sui-settings-label" id="rejected_cookies_label"><?php esc_html_e( 'Vary Cookies', 'powered-cache' ); ?></span> |
| 402 |
</div> |
| 403 |
|
| 404 |
<div class="sui-box-settings-col-2"> |
| 405 |
<div class="sui-row"> |
| 406 |
<div class="sui-col-md-8"> |
| 407 |
<div class="sui-form-field"> |
| 408 |
<label for="vary_cookies" class="sui-label"><i><?php esc_html_e( 'Enter vary cookies (one per line)', 'powered-cache' ); ?></i></label> |
| 409 |
<textarea |
| 410 |
placeholder="(Eg: cookie_notice_accepted)" |
| 411 |
id="vary_cookies" |
| 412 |
name="vary_cookies" |
| 413 |
class="sui-form-control" |
| 414 |
aria-labelledby="vary_cookies_label" |
| 415 |
aria-describedby="vary_cookies_description" |
| 416 |
rows="5" |
| 417 |
><?php echo esc_textarea( $settings['vary_cookies'] ); ?></textarea> |
| 418 |
<span id="vary_cookies_description" class="sui-description"><?php esc_html_e( 'Separate cache will be generated based on the cookie match.', 'powered-cache' ); ?> |
| 419 |
(<a href="<?php echo esc_url( get_doc_url( '/advanced-options/', 'vary-cookies' ) ); ?>" target="_blank">?</a>) |
| 420 |
</span> |
| 421 |
</div> |
| 422 |
</div> |
| 423 |
</div> |
| 424 |
</div> |
| 425 |
</div> |
| 426 |
|
| 427 |
<!-- Never cache the following pages --> |
| 428 |
<div class="sui-box-settings-row"> |
| 429 |
<div class="sui-box-settings-col-1"> |
| 430 |
<span class="sui-settings-label"><?php esc_html_e( 'Never cache the following pages', 'powered-cache' ); ?></span> |
| 431 |
</div> |
| 432 |
|
| 433 |
<div class="sui-box-settings-col-2"> |
| 434 |
<div class="sui-row"> |
| 435 |
|
| 436 |
<div class="sui-col-md-8"> |
| 437 |
<div class="sui-form-field"> |
| 438 |
<label for="rejected_uri" class="sui-label"><i><?php esc_html_e( 'Enter pages that will never get cached (one per line)', 'powered-cache' ); ?></i></label> |
| 439 |
<textarea |
| 440 |
placeholder="/example-page" |
| 441 |
id="rejected_uri" |
| 442 |
name="rejected_uri" |
| 443 |
class="sui-form-control" |
| 444 |
aria-describedby="rejected_uri_description" |
| 445 |
rows="5" |
| 446 |
><?php echo esc_textarea( $settings['rejected_uri'] ); ?></textarea> |
| 447 |
<span id="rejected_uri_description" class="sui-description"><?php esc_html_e( 'Ignore the specified pages / directories. Supports regex.', 'powered-cache' ); ?> |
| 448 |
(<a href="<?php echo esc_url( get_doc_url( '/advanced-options/', 'ignored-pages' ) ); ?>" target="_blank">?</a>) |
| 449 |
</span> |
| 450 |
</div> |
| 451 |
</div> |
| 452 |
</div> |
| 453 |
</div> |
| 454 |
</div> |
| 455 |
|
| 456 |
<!-- Accepted query strings --> |
| 457 |
<div class="sui-box-settings-row"> |
| 458 |
<div class="sui-box-settings-col-1"> |
| 459 |
<span class="sui-settings-label"><?php esc_html_e( 'Accepted query strings', 'powered-cache' ); ?></span> |
| 460 |
</div> |
| 461 |
<div class="sui-box-settings-col-2"> |
| 462 |
<div class="sui-row"> |
| 463 |
<div class="sui-col-md-8"> |
| 464 |
<div class="sui-form-field"> |
| 465 |
<label for="accepted_query_strings" class="sui-label"><i><?php esc_html_e( 'Enter allowed query parameter (one per line)', 'powered-cache' ); ?></i></label> |
| 466 |
<textarea |
| 467 |
placeholder="utm_" |
| 468 |
id="accepted_query_strings" |
| 469 |
name="accepted_query_strings" |
| 470 |
class="sui-form-control" |
| 471 |
aria-describedby="accepted_query_strings_description" |
| 472 |
rows="5" |
| 473 |
><?php echo esc_textarea( $settings['accepted_query_strings'] ); ?></textarea> |
| 474 |
<span id="accepted_query_strings_description" class="sui-description"> |
| 475 |
<?php esc_html_e( 'Powered Cache will ignore these query string and serve the standard cache file. Tracking parameters such as utm_* ignored by default.', 'powered-cache' ); ?> |
| 476 |
(<a href="<?php echo esc_url( get_doc_url( '/advanced-options/', 'accepted-query-strings' ) ); ?>" target="_blank">?</a>) |
| 477 |
</span> |
| 478 |
</div> |
| 479 |
</div> |
| 480 |
</div> |
| 481 |
</div> |
| 482 |
</div> |
| 483 |
|
| 484 |
<!-- Purge Additional Pages --> |
| 485 |
<div class="sui-box-settings-row"> |
| 486 |
<div class="sui-box-settings-col-1"> |
| 487 |
<span class="sui-settings-label"><?php esc_html_e( 'Purge Additional Pages', 'powered-cache' ); ?></span> |
| 488 |
</div> |
| 489 |
|
| 490 |
<div class="sui-box-settings-col-2"> |
| 491 |
<div class="sui-row"> |
| 492 |
<div class="sui-col-md-8"> |
| 493 |
<div class="sui-form-field"> |
| 494 |
<label for="purge_additional_pages" class="sui-label"><i><?php esc_html_e( 'Enter additional pages will purged (one per line)', 'powered-cache' ); ?></i></label> |
| 495 |
<textarea |
| 496 |
placeholder="/sample-page" |
| 497 |
id="purge_additional_pages" |
| 498 |
name="purge_additional_pages" |
| 499 |
class="sui-form-control" |
| 500 |
aria-describedby="purge_additional_pages_description" |
| 501 |
rows="5" |
| 502 |
><?php echo esc_textarea( $settings['purge_additional_pages'] ); ?></textarea> |
| 503 |
<span id="purge_additional_pages_description" class="sui-description"> |
| 504 |
<?php esc_html_e( 'Powered Cache is smart enough to purge only necessary pages during the post changes, however sometimes particular pages need to purge. (eg. the pages that use custom shortcode)', 'powered-cache' ); ?> |
| 505 |
(<a href="<?php echo esc_url( get_doc_url( '/advanced-options/', 'purge-additional-pages' ) ); ?>" target="_blank">?</a>) |
| 506 |
</span> |
| 507 |
</div> |
| 508 |
</div> |
| 509 |
</div> |
| 510 |
</div> |
| 511 |
</div> |
| 512 |
|
| 513 |
</div> |
| 514 |
<div class="sui-box-footer"> |
| 515 |
<div class="sui-actions-left"> |
| 516 |
<button type="submit" name="powered_cache_form_action" value="save_settings" class="sui-button sui-button-blue"> |
| 517 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 518 |
<?php esc_html_e( 'Update settings', 'powered-cache' ); ?> |
| 519 |
</button> |
| 520 |
</div> |
| 521 |
</div> |
| 522 |
</div> |
| 523 |
|
| 524 |
<!-- TAB: File Optimization --> |
| 525 |
<div class="sui-box" id="file-optimization" data-tab="file-optimization" style="display: none;"> |
| 526 |
|
| 527 |
<div class="sui-box-header"> |
| 528 |
<h2 class="sui-box-title"><?php esc_html_e( 'File Optimization', 'powered-cache' ); ?></h2> |
| 529 |
</div> |
| 530 |
|
| 531 |
<div class="sui-box-body"> |
| 532 |
<?php |
| 533 |
/** |
| 534 |
* Fires before file optimization section |
| 535 |
* |
| 536 |
* @hook powered_cache_admin_page_before_file_optimization |
| 537 |
* |
| 538 |
* @since 2.0 |
| 539 |
*/ |
| 540 |
do_action( 'powered_cache_admin_page_before_file_optimization' ); |
| 541 |
?> |
| 542 |
<!-- Basic Settings --> |
| 543 |
<div class="<?php echo esc_attr( apply_filters( 'powered_cache_admin_page_fo_basic_settings_classes', 'sui-box-settings-row ' ) ); ?>"> |
| 544 |
<div class="sui-box-settings-col-1"> |
| 545 |
<span class="sui-settings-label"><?php esc_html_e( 'Basic Settings', 'powered-cache' ); ?></span> |
| 546 |
</div> |
| 547 |
|
| 548 |
<div class="sui-box-settings-col-2"> |
| 549 |
<div class="sui-form-field"> |
| 550 |
<label for="minify_html" class="sui-toggle"> |
| 551 |
<input |
| 552 |
type="checkbox" |
| 553 |
id="minify_html" |
| 554 |
name="minify_html" |
| 555 |
aria-labelledby="minify_html_label" |
| 556 |
value="1" |
| 557 |
<?php checked( 1, $settings['minify_html'] ); ?> |
| 558 |
> |
| 559 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 560 |
<span id="minify_html_label" class="sui-toggle-label"><?php esc_html_e( 'Minify HTML', 'powered-cache' ); ?></span> |
| 561 |
<span id="minify_html_label_description" class="sui-description"><?php esc_html_e( 'Removes all whitespace characters from the HTML output, minimizing the HTML size.', 'powered-cache' ); ?></span> |
| 562 |
</label> |
| 563 |
</div> |
| 564 |
|
| 565 |
<div class="sui-form-field"> |
| 566 |
<label for="combine_google_fonts" class="sui-toggle"> |
| 567 |
<input |
| 568 |
type="checkbox" |
| 569 |
id="combine_google_fonts" |
| 570 |
name="combine_google_fonts" |
| 571 |
aria-labelledby="combine_google_fonts_label" |
| 572 |
value="1" |
| 573 |
<?php checked( 1, $settings['combine_google_fonts'] ); ?> |
| 574 |
> |
| 575 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 576 |
<span id="combine_google_fonts_label" class="sui-toggle-label"><?php esc_html_e( 'Combine Google Fonts', 'powered-cache' ); ?></span> |
| 577 |
<span id="combine-google-fonts-description" class="sui-description"> |
| 578 |
<?php esc_html_e( 'Combines all Google Fonts URLs into a single URL and optimizes loading of that URL.', 'powered-cache' ); ?> |
| 579 |
(<a href="<?php echo esc_url( get_doc_url( '/combine-google-fonts/' ) ); ?>" target="_blank">?</a>) |
| 580 |
</span> |
| 581 |
</label> |
| 582 |
</div> |
| 583 |
|
| 584 |
</div> |
| 585 |
</div> |
| 586 |
|
| 587 |
<!-- CSS Files --> |
| 588 |
<div class="<?php echo esc_attr( apply_filters( 'powered_cache_admin_page_fo_css_classes', 'sui-box-settings-row ' ) ); ?>"> |
| 589 |
<div class="sui-box-settings-col-1"> |
| 590 |
<span class="sui-settings-label"><?php esc_html_e( 'CSS Optimization', 'powered-cache' ); ?> |
| 591 |
(<a href="<?php echo esc_url( get_doc_url( '/css-optimization/' ) ); ?>" target="_blank">?</a>) |
| 592 |
</span> |
| 593 |
</div> |
| 594 |
|
| 595 |
<div class="sui-box-settings-col-2"> |
| 596 |
|
| 597 |
<div class="sui-form-field"> |
| 598 |
<label for="minify_css" class="sui-toggle"> |
| 599 |
<input |
| 600 |
type="checkbox" |
| 601 |
id="minify_css" |
| 602 |
name="minify_css" |
| 603 |
aria-labelledby="minify_css_label" |
| 604 |
value="1" |
| 605 |
<?php checked( 1, $settings['minify_css'] ); ?> |
| 606 |
> |
| 607 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 608 |
<span id="minify_css_label" class="sui-toggle-label"><?php esc_html_e( 'Minify CSS' ); ?></span> |
| 609 |
<span id="minify_css_description" class="sui-description"><?php esc_html_e( 'Minify CSS files', 'powered-cache' ); ?></span> |
| 610 |
</label> |
| 611 |
</div> |
| 612 |
|
| 613 |
<div class="sui-form-field"> |
| 614 |
<label for="combine_css" class="sui-toggle"> |
| 615 |
<input |
| 616 |
type="checkbox" |
| 617 |
id="combine_css" |
| 618 |
name="combine_css" |
| 619 |
aria-labelledby="combine_css_label" |
| 620 |
value="1" |
| 621 |
<?php checked( 1, $settings['combine_css'] ); ?> |
| 622 |
> |
| 623 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 624 |
<span id="combine_css_label" class="sui-toggle-label"><?php esc_html_e( 'Combine CSS files' ); ?></span> |
| 625 |
<span id="combine_css_description" class="sui-description"><?php esc_html_e( 'Combine CSS files to reduce HTTP requests', 'powered-cache' ); ?></span> |
| 626 |
</label> |
| 627 |
</div> |
| 628 |
|
| 629 |
<div class="sui-row"> |
| 630 |
<div class="sui-col-md-8"> |
| 631 |
<div class="sui-form-field"> |
| 632 |
<label for="excluded_css_files" class="sui-label"><i><?php esc_html_e( 'CSS files to exclude (one per line)', 'powered-cache' ); ?></i></label> |
| 633 |
<textarea |
| 634 |
placeholder="e.g /wp-content/themes/example/style/custom.css" |
| 635 |
id="excluded_css_files" |
| 636 |
name="excluded_css_files" |
| 637 |
class="sui-form-control" |
| 638 |
aria-labelledby="label-unique-id" |
| 639 |
aria-describedby="excluded_css_files_description" |
| 640 |
rows="5" |
| 641 |
><?php echo esc_textarea( $settings['excluded_css_files'] ); ?></textarea> |
| 642 |
<span id="excluded_css_files_description" class="sui-description"> |
| 643 |
<?php esc_html_e( 'Listed files will not get minified or combined', 'powered-cache' ); ?> |
| 644 |
</span> |
| 645 |
</div> |
| 646 |
</div> |
| 647 |
</div> |
| 648 |
|
| 649 |
</div> |
| 650 |
</div> |
| 651 |
|
| 652 |
<!-- JS Files --> |
| 653 |
<div class="<?php echo esc_attr( apply_filters( 'powered_cache_admin_page_fo_js_classes', 'sui-box-settings-row ' ) ); ?>"> |
| 654 |
<div class="sui-box-settings-col-1"> |
| 655 |
<span class="sui-settings-label"><?php esc_html_e( 'JavaScript Optimization', 'powered-cache' ); ?> |
| 656 |
(<a href="<?php echo esc_url( get_doc_url( '/js-optimization/' ) ); ?>" target="_blank">?</a>) |
| 657 |
</span> |
| 658 |
</div> |
| 659 |
|
| 660 |
<div class="sui-box-settings-col-2"> |
| 661 |
|
| 662 |
<div class="sui-form-field"> |
| 663 |
<label for="minify_js" class="sui-toggle"> |
| 664 |
<input |
| 665 |
type="checkbox" |
| 666 |
id="minify_js" |
| 667 |
name="minify_js" |
| 668 |
aria-labelledby="minify_js_label" |
| 669 |
value="1" |
| 670 |
<?php checked( 1, $settings['minify_js'] ); ?> |
| 671 |
> |
| 672 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 673 |
<span id="minify_js_label" class="sui-toggle-label"><?php esc_html_e( 'Minify JavaScript Files', 'powered-cache' ); ?></span> |
| 674 |
<span id="minify_js_description" class="sui-description"><?php esc_html_e( 'Removes whitespace and comments to reduce file size', 'powered-cache' ); ?></span> |
| 675 |
</label> |
| 676 |
</div> |
| 677 |
|
| 678 |
<div class="sui-form-field"> |
| 679 |
<label for="combine_js" class="sui-toggle"> |
| 680 |
<input |
| 681 |
type="checkbox" |
| 682 |
id="combine_js" |
| 683 |
name="combine_js" |
| 684 |
aria-labelledby="combine_js_label" |
| 685 |
value="1" |
| 686 |
<?php checked( 1, $settings['combine_js'] ); ?> |
| 687 |
> |
| 688 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 689 |
<span id="combine_js_label" class="sui-toggle-label"><?php esc_html_e( 'Combine JavaScript Files', 'powered-cache' ); ?></span> |
| 690 |
<span id="combine_js_description" class="sui-description"><?php esc_html_e( 'Combines JS files into fewer files to reduce HTTP requests.', 'powered-cache' ); ?></span> |
| 691 |
</label> |
| 692 |
</div> |
| 693 |
|
| 694 |
<div class="sui-row"> |
| 695 |
<div class="sui-col-md-8"> |
| 696 |
<div class="sui-form-field"> |
| 697 |
<label for="excluded_js_files" class="sui-label"><i><?php esc_html_e( 'JavaScript files to exclude (one per line)', 'powered-cache' ); ?></i></label> |
| 698 |
<textarea |
| 699 |
placeholder="e.g /wp-content/themes/example/js/custom.js" |
| 700 |
id="excluded_js_files" |
| 701 |
name="excluded_js_files" |
| 702 |
class="sui-form-control" |
| 703 |
aria-labelledby="label-unique-id" |
| 704 |
aria-describedby="excluded_js_files_description" |
| 705 |
rows="5" |
| 706 |
><?php echo esc_textarea( $settings['excluded_js_files'] ); ?></textarea> |
| 707 |
<span id="excluded_js_files_description" class="sui-description"> |
| 708 |
<?php esc_html_e( 'Listed files will not get minified or combined', 'powered-cache' ); ?> |
| 709 |
</span> |
| 710 |
</div> |
| 711 |
</div> |
| 712 |
</div> |
| 713 |
|
| 714 |
</div> |
| 715 |
</div> |
| 716 |
|
| 717 |
<div class="<?php echo esc_attr( apply_filters( 'powered_cache_admin_page_fo_js_classes', 'sui-box-settings-row ' ) ); ?>"> |
| 718 |
<div class="sui-box-settings-col-1"> |
| 719 |
<span class="sui-settings-label" id="js_execution_method_label"><?php esc_html_e( 'JavaScript execution method', 'powered-cache' ); ?></span> |
| 720 |
<span class="sui-description"></span> |
| 721 |
</div> |
| 722 |
<div class="sui-box-settings-col-2"> |
| 723 |
<div class="sui-form-field"> |
| 724 |
<select id="js_execution_method" name="js_execution_method" aria-labelledby="js_execution_method_label" aria-describedby="js_execution_method_description"> |
| 725 |
<?php foreach ( js_execution_methods() as $method => $name ) : ?> |
| 726 |
<option <?php selected( $settings['js_execution_method'], esc_attr( $method ) ); ?> value="<?php echo esc_attr( $method ); ?>"><?php echo esc_attr( $name ); ?></option> |
| 727 |
<?php endforeach; ?> |
| 728 |
</select> |
| 729 |
|
| 730 |
<span id="js_execution_method_description" class="sui-description"><?php esc_html_e( 'It determines how browsers execute the JS scripts.', 'powered-cache' ); ?></span> |
| 731 |
</div> |
| 732 |
|
| 733 |
<div class="sui-form-field"> |
| 734 |
<label for="js_execution_optimized_only" class="sui-toggle"> |
| 735 |
<input |
| 736 |
type="checkbox" |
| 737 |
id="js_execution_optimized_only" |
| 738 |
name="js_execution_optimized_only" |
| 739 |
aria-labelledby="js_execution_optimized_only_label" |
| 740 |
value="1" |
| 741 |
<?php checked( 1, $settings['js_execution_optimized_only'] ); ?> |
| 742 |
> |
| 743 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 744 |
<span id="js_execution_optimized_only_label" class="sui-toggle-label"><?php esc_html_e( 'Use execution method for the optimized scripts only', 'powered-cache' ); ?></span> |
| 745 |
<span id="js_execution_optimized_only_description" class="sui-description"><?php esc_html_e( 'When this option is turned off all JS scripts will be executed in the same way.', 'powered-cache' ); ?></span> |
| 746 |
</label> |
| 747 |
</div> |
| 748 |
|
| 749 |
</div> |
| 750 |
|
| 751 |
</div> |
| 752 |
</div> |
| 753 |
|
| 754 |
<div class="sui-box-footer"> |
| 755 |
<div class="sui-actions-left"> |
| 756 |
<button type="submit" name="powered_cache_form_action" value="save_settings" class="sui-button sui-button-blue"> |
| 757 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 758 |
<?php esc_html_e( 'Update settings', 'powered-cache' ); ?> |
| 759 |
</button> |
| 760 |
</div> |
| 761 |
</div> |
| 762 |
</div> |
| 763 |
|
| 764 |
<!-- TAB: Media --> |
| 765 |
<div class="sui-box" id="media-optimization" data-tab="media-optimization" style="display: none;"> |
| 766 |
|
| 767 |
<div class="sui-box-header"> |
| 768 |
<h2 class="sui-box-title"><?php esc_html_e( 'Media Optimization', 'powered-cache' ); ?></h2> |
| 769 |
</div> |
| 770 |
|
| 771 |
<div class="sui-box-body"> |
| 772 |
<?php do_action( 'powered_cache_admin_page_before_media_optimization' ); ?> |
| 773 |
<!-- Lazy Load settings --> |
| 774 |
|
| 775 |
<div class="<?php echo esc_attr( apply_filters( 'powered_cache_admin_page_lazy_load_settings_classes', 'sui-box-settings-row' ) ); ?>"> |
| 776 |
|
| 777 |
<div class="sui-box-settings-col-1"> |
| 778 |
<span class="sui-settings-label"><?php esc_html_e( 'Lazy Load', 'powered-cache' ); ?></span> |
| 779 |
<span class="sui-description"> |
| 780 |
<?php esc_html_e( 'Loads images and iframes only when visible to the user.', 'powered-cache' ); ?> |
| 781 |
(<a href="<?php echo esc_url( get_doc_url( '/enable-lazy-load/' ) ); ?>" target="_blank">?</a>) |
| 782 |
</span> |
| 783 |
</div> |
| 784 |
|
| 785 |
<div class="sui-box-settings-col-2"> |
| 786 |
|
| 787 |
<div class="sui-form-field"> |
| 788 |
<div class="sui-row "> |
| 789 |
<label for="enable_lazy_load" class="sui-toggle"> |
| 790 |
<input |
| 791 |
type="checkbox" |
| 792 |
id="enable_lazy_load" |
| 793 |
name="enable_lazy_load" |
| 794 |
aria-labelledby="enable_lazy_load_label" |
| 795 |
aria-controls="lazy-load-details" |
| 796 |
value="1" |
| 797 |
<?php checked( 1, $settings['enable_lazy_load'] ); ?> |
| 798 |
> |
| 799 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 800 |
<span id="enable_lazy_load_label" class="sui-toggle-label"><?php esc_html_e( 'Enable Lazy Load', 'powered-cache' ); ?></span> |
| 801 |
</label> |
| 802 |
</div> |
| 803 |
|
| 804 |
<div style=" <?php echo( ! $settings['enable_lazy_load'] ? 'display:none' : '' ); ?>" tabindex="0" id="lazy-load-details" class="sui-toggle-content sui-border-frame"> |
| 805 |
|
| 806 |
<div class="sui-form-field"> |
| 807 |
<div class="sui-row"> |
| 808 |
<label for="lazy_load_post_content" class="sui-checkbox"> |
| 809 |
|
| 810 |
<input |
| 811 |
type="checkbox" |
| 812 |
id="lazy_load_post_content" |
| 813 |
name="lazy_load_post_content" |
| 814 |
value="1" |
| 815 |
<?php checked( 1, $settings['lazy_load_post_content'] ); ?> |
| 816 |
> |
| 817 |
|
| 818 |
<span aria-hidden="true"></span> |
| 819 |
<span id="lazy_load_post_content_label"><?php esc_html_e( 'Enable for post content.', 'powered-cache' ); ?></span> |
| 820 |
</label> |
| 821 |
</div> |
| 822 |
|
| 823 |
<div class="sui-row"> |
| 824 |
<label for="lazy_load_images" class="sui-checkbox"> |
| 825 |
|
| 826 |
<input |
| 827 |
type="checkbox" |
| 828 |
id="lazy_load_images" |
| 829 |
name="lazy_load_images" |
| 830 |
value="1" |
| 831 |
<?php checked( 1, $settings['lazy_load_images'] ); ?> |
| 832 |
> |
| 833 |
|
| 834 |
<span aria-hidden="true"></span> |
| 835 |
<span id="lazy_load_images_label"><?php esc_html_e( 'Enable for images.', 'powered-cache' ); ?></span> |
| 836 |
</label> |
| 837 |
</div> |
| 838 |
|
| 839 |
<div class="sui-row"> |
| 840 |
<label for="lazy_load_iframes" class="sui-checkbox"> |
| 841 |
|
| 842 |
<input |
| 843 |
type="checkbox" |
| 844 |
id="lazy_load_iframes" |
| 845 |
name="lazy_load_iframes" |
| 846 |
value="1" |
| 847 |
<?php checked( 1, $settings['lazy_load_iframes'] ); ?> |
| 848 |
> |
| 849 |
|
| 850 |
<span aria-hidden="true"></span> |
| 851 |
<span id="lazy_load_iframes_label"><?php esc_html_e( 'Enable for iframes.', 'powered-cache' ); ?></span> |
| 852 |
</label> |
| 853 |
</div> |
| 854 |
<div class="sui-row"> |
| 855 |
<label for="lazy_load_widgets" class="sui-checkbox"> |
| 856 |
|
| 857 |
<input |
| 858 |
type="checkbox" |
| 859 |
id="lazy_load_widgets" |
| 860 |
name="lazy_load_widgets" |
| 861 |
value="1" |
| 862 |
<?php checked( 1, $settings['lazy_load_widgets'] ); ?> |
| 863 |
> |
| 864 |
|
| 865 |
<span aria-hidden="true"></span> |
| 866 |
<span id="lazy_load_widgets_label"><?php esc_html_e( 'Enable for widgets.', 'powered-cache' ); ?></span> |
| 867 |
</label> |
| 868 |
</div> |
| 869 |
<div class="sui-row"> |
| 870 |
<label for="lazy_load_post_thumbnail" class="sui-checkbox"> |
| 871 |
|
| 872 |
<input |
| 873 |
type="checkbox" |
| 874 |
id="lazy_load_post_thumbnail" |
| 875 |
name="lazy_load_post_thumbnail" |
| 876 |
value="1" |
| 877 |
<?php checked( 1, $settings['lazy_load_post_thumbnail'] ); ?> |
| 878 |
> |
| 879 |
|
| 880 |
<span aria-hidden="true"></span> |
| 881 |
<span id="lazy_load_post_thumbnail_label"><?php esc_html_e( 'Enable for post thumbnails.', 'powered-cache' ); ?></span> |
| 882 |
</label> |
| 883 |
</div> |
| 884 |
<div class="sui-row"> |
| 885 |
<label for="lazy_load_avatars" class="sui-checkbox"> |
| 886 |
|
| 887 |
<input |
| 888 |
type="checkbox" |
| 889 |
id="lazy_load_avatars" |
| 890 |
name="lazy_load_avatars" |
| 891 |
value="1" |
| 892 |
<?php checked( 1, $settings['lazy_load_avatars'] ); ?> |
| 893 |
> |
| 894 |
|
| 895 |
<span aria-hidden="true"></span> |
| 896 |
<span id="lazy_load_avatars_label"><?php esc_html_e( 'Enable for avatars.', 'powered-cache' ); ?></span> |
| 897 |
</label> |
| 898 |
</div> |
| 899 |
</div> |
| 900 |
|
| 901 |
</div> |
| 902 |
|
| 903 |
<div class="sui-row"> |
| 904 |
<label for="disable_wp_lazy_load" class="sui-toggle"> |
| 905 |
<input |
| 906 |
type="checkbox" |
| 907 |
id="disable_wp_lazy_load" |
| 908 |
name="disable_wp_lazy_load" |
| 909 |
aria-labelledby="disable_wp_lazy_load_label" |
| 910 |
value="1" |
| 911 |
<?php checked( 1, $settings['disable_wp_lazy_load'] ); ?> |
| 912 |
> |
| 913 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 914 |
<span id="disable_wp_lazy_load_label" class="sui-toggle-label"><?php esc_html_e( 'Disable WordPress Native Lazy Load', 'powered-cache' ); ?></span> |
| 915 |
</label> |
| 916 |
</div> |
| 917 |
</div> |
| 918 |
</div> |
| 919 |
|
| 920 |
</div> |
| 921 |
|
| 922 |
<div class="sui-box-settings-row"> |
| 923 |
|
| 924 |
<div class="sui-box-settings-col-1"> |
| 925 |
<span class="sui-settings-label"><?php esc_html_e( 'Embeds', 'powered-cache' ); ?></span> |
| 926 |
<span class="sui-description"></span> |
| 927 |
</div> |
| 928 |
|
| 929 |
<div class="sui-box-settings-col-2"> |
| 930 |
<div class="sui-form-field"> |
| 931 |
<label for="disable_wp_embeds" class="sui-toggle"> |
| 932 |
<input |
| 933 |
type="checkbox" |
| 934 |
id="disable_wp_embeds" |
| 935 |
name="disable_wp_embeds" |
| 936 |
aria-labelledby="disable_wp_embeds_label" |
| 937 |
aria-describedby="disable_wp_embeds_description" |
| 938 |
value="1" |
| 939 |
<?php checked( 1, $settings['disable_wp_embeds'] ); ?> |
| 940 |
> |
| 941 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 942 |
<span id="disable_wp_embeds_label" class="sui-toggle-label"><?php esc_html_e( 'Disable WordPress Embeds', 'powered-cache' ); ?></span> |
| 943 |
<span id="disable_wp_embeds_description" class="sui-description"><?php esc_html_e( 'Disables embedding posts from WordPress-based websites (including your own) which converts URLs into heavy iframes.', 'powered-cache' ); ?> |
| 944 |
(<a href="<?php echo esc_url( get_doc_url( '/disable-wordpress-embeds/' ) ); ?>" target="_blank">?</a>) |
| 945 |
</span> |
| 946 |
</label> |
| 947 |
</div> |
| 948 |
</div> |
| 949 |
</div> |
| 950 |
|
| 951 |
<div class="sui-box-settings-row"> |
| 952 |
|
| 953 |
<div class="sui-box-settings-col-1"> |
| 954 |
<span class="sui-settings-label"><?php esc_html_e( 'Emoji', 'powered-cache' ); ?></span> |
| 955 |
<span class="sui-description"></span> |
| 956 |
</div> |
| 957 |
|
| 958 |
<div class="sui-box-settings-col-2"> |
| 959 |
<div class="sui-form-field"> |
| 960 |
<label for="disable_emoji_scripts" class="sui-toggle"> |
| 961 |
<input |
| 962 |
type="checkbox" |
| 963 |
id="disable_emoji_scripts" |
| 964 |
name="disable_emoji_scripts" |
| 965 |
aria-labelledby="disable_emoji_scripts_label" |
| 966 |
aria-describedby="disable_emoji_scripts_description" |
| 967 |
value="1" |
| 968 |
<?php checked( 1, $settings['disable_emoji_scripts'] ); ?> |
| 969 |
> |
| 970 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 971 |
<span id="disable_emoji_scripts_label" class="sui-toggle-label"><?php esc_html_e( 'Remove Emoji Scripts', 'powered-cache' ); ?></span> |
| 972 |
<span id="disable_emoji_scripts_description" class="sui-description"> |
| 973 |
<?php esc_html_e( 'Removes the unnecessary emoji scripts from your website front-end. Doesn\'t remove emojis, don\'t worry.', 'powered-cache' ); ?> |
| 974 |
(<a href="<?php echo esc_url( get_doc_url( '/remove-emoji-scripts/' ) ); ?>" target="_blank">?</a>) |
| 975 |
</span> |
| 976 |
</label> |
| 977 |
</div> |
| 978 |
</div> |
| 979 |
</div> |
| 980 |
|
| 981 |
</div> |
| 982 |
<div class="sui-box-footer"> |
| 983 |
<div class="sui-actions-left"> |
| 984 |
<button type="submit" name="powered_cache_form_action" value="save_settings" class="sui-button sui-button-blue"> |
| 985 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 986 |
<?php esc_html_e( 'Update settings', 'powered-cache' ); ?> |
| 987 |
</button> |
| 988 |
</div> |
| 989 |
</div> |
| 990 |
</div> |
| 991 |
|
| 992 |
<!-- TAB: CDN --> |
| 993 |
<div class="sui-box" id="cdn-integration" data-tab="cdn-integration" style="display: none;"> |
| 994 |
|
| 995 |
<div class="sui-box-header"> |
| 996 |
<h2 class="sui-box-title"><?php esc_html_e( 'CDN Integration', 'powered-cache' ); ?></h2> |
| 997 |
</div> |
| 998 |
|
| 999 |
<div class="sui-box-body"> |
| 1000 |
<div class="sui-box-settings-row"> |
| 1001 |
<div class="sui-box-settings-col-1"> |
| 1002 |
<span class="sui-settings-label"><?php esc_html_e( 'CDN', 'powered-cache' ); ?></span> |
| 1003 |
<span class="sui-description"></span> |
| 1004 |
</div> |
| 1005 |
|
| 1006 |
<div class="sui-box-settings-col-2"> |
| 1007 |
<div class="sui-form-field"> |
| 1008 |
<label for="enable_cdn" class="sui-toggle"> |
| 1009 |
<input |
| 1010 |
type="checkbox" |
| 1011 |
id="enable_cdn" |
| 1012 |
name="enable_cdn" |
| 1013 |
aria-labelledby="enable_cdn_label" |
| 1014 |
aria-describedby="enable_cdn_description" |
| 1015 |
value="1" |
| 1016 |
<?php checked( 1, $settings['enable_cdn'] ); ?> |
| 1017 |
> |
| 1018 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1019 |
<span id="enable_cdn_label" class="sui-toggle-label"><?php esc_html_e( 'Enable CDN Integration', 'powered-cache' ); ?></span> |
| 1020 |
<span id="enable_cdn_description" class="sui-description"><?php esc_html_e( 'Please make sure that your CDN is properly setup before enabling this feature ', 'powered-cache' ); ?> |
| 1021 |
<a href="<?php echo esc_url( get_doc_url( '/cdn-integration/' ) ); ?>" target="_blank">(?)</a></span> |
| 1022 |
</label> |
| 1023 |
</div> |
| 1024 |
</div> |
| 1025 |
|
| 1026 |
</div> |
| 1027 |
|
| 1028 |
<div class="sui-box-settings-row"> |
| 1029 |
<div class="sui-box-settings-col-1"> |
| 1030 |
<span class="sui-settings-label"><?php esc_html_e( 'CDN Hostnames', 'powered-cache' ); ?></span> |
| 1031 |
<span class="sui-description"><?php esc_html_e( 'Enter your CNAME(s)', 'powered-cache' ); ?></span> |
| 1032 |
</div> |
| 1033 |
|
| 1034 |
<div class="sui-box-settings-col-2"> |
| 1035 |
<div id="cdn-zones" class="sui-form-field"> |
| 1036 |
<?php foreach ( $settings['cdn_hostname'] as $key => $cdn ) : ?> |
| 1037 |
<div id="cdn-zone-<?php echo absint( $key ); ?>" class="cdn-zone sui-form-field"> |
| 1038 |
<input id="cdn_hostname" value="<?php echo esc_url( $cdn ); ?>" name="cdn_hostname[]" style="width: 300px" placeholder="https://cdn.example.org" class="cdn_hostname sui-form-control sui-input-md sui-field-has-suffix" aria-labelledby="label-unique-id"> |
| 1039 |
<span>for</span> |
| 1040 |
<span class="sui-field-suffix" style="width: 120px"> |
| 1041 |
<div class="sui-form-field sui-input-md"> |
| 1042 |
<select id="cdn_zone" name="cdn_zone[]" class="sui-form-control cdn_zone"> |
| 1043 |
<?php foreach ( cdn_zones() as $zone => $zone_name ) : ?> |
| 1044 |
<option <?php selected( $settings['cdn_zone'][ $key ], $zone ); ?> value="<?php echo esc_attr( $zone ); ?>"><?php echo esc_attr( $zone_name ); ?></option> |
| 1045 |
<?php endforeach; ?> |
| 1046 |
</select> |
| 1047 |
</div> |
| 1048 |
</span> |
| 1049 |
<button role="button" type="button" class="remove_cdn_hostname sui-button-icon <?php echo( 0 === $key ? 'sui-hidden-important' : '' ); ?>"> |
| 1050 |
<span class="sui-icon-close" aria-hidden="true"></span> |
| 1051 |
</button> |
| 1052 |
</div> |
| 1053 |
<?php endforeach; ?> |
| 1054 |
</div> |
| 1055 |
|
| 1056 |
<button role="button" type="button" class="add_cdn_hostname sui-button sui-button-blue sui-button-icon-right"> |
| 1057 |
<?php esc_html_e( 'Add Hostname', 'powered-cache' ); ?><i class="sui-icon-plus" aria-hidden="true"></i> |
| 1058 |
</button> |
| 1059 |
|
| 1060 |
</div> |
| 1061 |
</div> |
| 1062 |
|
| 1063 |
<div class="sui-box-settings-row"> |
| 1064 |
<div class="sui-box-settings-col-1"> |
| 1065 |
<span id="cdn_rejected_files_label" class="sui-settings-label"><?php esc_html_e( 'Rejected Files', 'powered-cache' ); ?></span> |
| 1066 |
</div> |
| 1067 |
|
| 1068 |
<div class="sui-box-settings-col-2"> |
| 1069 |
<div class="sui-row"> |
| 1070 |
|
| 1071 |
<div class="sui-col-md-8"> |
| 1072 |
|
| 1073 |
<div class="sui-form-field"> |
| 1074 |
<textarea |
| 1075 |
placeholder="e.g /wp-content/themes/example/js/custom.js" |
| 1076 |
id="cdn_rejected_files" |
| 1077 |
name="cdn_rejected_files" |
| 1078 |
class="sui-form-control" |
| 1079 |
aria-labelledby="cdn_rejected_files_label" |
| 1080 |
aria-describedby="cdn_rejected_files_description" |
| 1081 |
rows="5" |
| 1082 |
><?php echo esc_textarea( $settings['cdn_rejected_files'] ); ?></textarea> |
| 1083 |
<span id="cdn_rejected_files_description" class="sui-description"> |
| 1084 |
<?php esc_html_e( 'One URL per line. It can be full URL or absolute path.', 'powered-cache' ); ?> |
| 1085 |
</span> |
| 1086 |
</div> |
| 1087 |
</div> |
| 1088 |
</div> |
| 1089 |
</div> |
| 1090 |
</div> |
| 1091 |
|
| 1092 |
</div> |
| 1093 |
<div class="sui-box-footer"> |
| 1094 |
<div class="sui-actions-left"> |
| 1095 |
<button type="submit" name="powered_cache_form_action" value="save_settings" class="sui-button sui-button-blue"> |
| 1096 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 1097 |
<?php esc_html_e( 'Update settings', 'powered-cache' ); ?> |
| 1098 |
</button> |
| 1099 |
</div> |
| 1100 |
</div> |
| 1101 |
</div> |
| 1102 |
|
| 1103 |
<!-- TAB: Preload --> |
| 1104 |
<div class="sui-box" id="preload" data-tab="preload" style="display: none;"> |
| 1105 |
|
| 1106 |
<div class="sui-box-header"> |
| 1107 |
<h2 class="sui-box-title"><?php esc_html_e( 'Preload', 'powered-cache' ); ?></h2> |
| 1108 |
</div> |
| 1109 |
|
| 1110 |
<div class="sui-box-body sui-upsell-items"> |
| 1111 |
<div id="preload_page_cache_warning_message" class="sui-notice sui-notice-warning" style="<?php echo( $settings['enable_page_cache'] ? 'display:none;' : '' ); ?> padding:10px 20px;margin-bottom:0;"> |
| 1112 |
|
| 1113 |
<div class="sui-notice-content"> |
| 1114 |
<div class="sui-notice-message"> |
| 1115 |
<span class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></span> |
| 1116 |
<p><?php esc_html_e( 'It seems page caching is not activated yet. Page caching needs to be enabled in order to get the advantage of preloading features!', 'powered-cache' ); ?></p> |
| 1117 |
</div> |
| 1118 |
</div> |
| 1119 |
</div> |
| 1120 |
|
| 1121 |
<div class="sui-box-settings-row"> |
| 1122 |
|
| 1123 |
<div class="sui-box-settings-col-1"> |
| 1124 |
<span class="sui-settings-label"><?php esc_html_e( 'Cache Preload', 'powered-cache' ); ?></span> |
| 1125 |
<span class="sui-description"> |
| 1126 |
<?php esc_html_e( 'Preloading will visit pages based on the settings and generate cache, just like any other visitor to the site.', 'powered-cache' ); ?> |
| 1127 |
(<a href="<?php echo esc_url( get_doc_url( '/enable-preloading/' ) ); ?>" target="_blank">?</a>) |
| 1128 |
</span> |
| 1129 |
</div> |
| 1130 |
|
| 1131 |
<div class="sui-box-settings-col-2"> |
| 1132 |
|
| 1133 |
<div class="sui-form-field"> |
| 1134 |
<div class="sui-row"> |
| 1135 |
<label for="enable_cache_preload" class="sui-toggle"> |
| 1136 |
<input |
| 1137 |
type="checkbox" |
| 1138 |
id="enable_cache_preload" |
| 1139 |
name="enable_cache_preload" |
| 1140 |
aria-labelledby="enable_cache_preload_label" |
| 1141 |
aria-describedby="enable_cache_preload_description" |
| 1142 |
aria-controls="enable_cache_preload_description_details" |
| 1143 |
value="1" |
| 1144 |
<?php checked( 1, $settings['enable_cache_preload'] ); ?> |
| 1145 |
> |
| 1146 |
|
| 1147 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1148 |
<span id="enable_cache_preload_label" class="sui-toggle-label"><?php esc_html_e( 'Enable Preloading', 'powered-cache' ); ?></span> |
| 1149 |
<span id="enable_cache_preload_description" class="sui-description"><?php esc_html_e( 'Activate preloading.', 'powered-cache' ); ?></span> |
| 1150 |
</label> |
| 1151 |
</div> |
| 1152 |
|
| 1153 |
<div style=" <?php echo( ! $settings['enable_cache_preload'] ? 'display:none' : '' ); ?>" tabindex="0" id="enable_cache_preload_description_details"> |
| 1154 |
|
| 1155 |
<div class="sui-form-field"> |
| 1156 |
|
| 1157 |
<div class="sui-row"> |
| 1158 |
<label for="preload_homepage" class="sui-toggle"> |
| 1159 |
<input |
| 1160 |
type="checkbox" |
| 1161 |
id="preload_homepage" |
| 1162 |
name="preload_homepage" |
| 1163 |
aria-labelledby="preload_homepage_label" |
| 1164 |
aria-describedby="preload_homepage_description" |
| 1165 |
value="1" |
| 1166 |
<?php checked( 1, $settings['preload_homepage'] ); ?> |
| 1167 |
> |
| 1168 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1169 |
<span id="preload_homepage_label" class="sui-toggle-label"><?php esc_html_e( 'Enable for homepage', 'powered-cache' ); ?></span> |
| 1170 |
<span id="preload_homepage_description" class="sui-description"><?php esc_html_e( 'Preloads homepage.', 'powered-cache' ); ?></span> |
| 1171 |
</label> |
| 1172 |
</div> |
| 1173 |
|
| 1174 |
<div class="sui-row"> |
| 1175 |
<label for="preload_public_posts" class="sui-toggle"> |
| 1176 |
<input |
| 1177 |
type="checkbox" |
| 1178 |
id="preload_public_posts" |
| 1179 |
name="preload_public_posts" |
| 1180 |
aria-labelledby="preload_public_posts_label" |
| 1181 |
aria-describedby="preload_public_posts_description" |
| 1182 |
value="1" |
| 1183 |
<?php checked( 1, $settings['preload_public_posts'] ); ?> |
| 1184 |
> |
| 1185 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1186 |
<span id="preload_public_posts_label" class="sui-toggle-label"><?php esc_html_e( 'Enable for posts', 'powered-cache' ); ?></span> |
| 1187 |
<span id="preload_public_posts_description" class="sui-description"><?php esc_html_e( 'Individual post pages will be preloaded. The public post types are supported.', 'powered-cache' ); ?></span> |
| 1188 |
</label> |
| 1189 |
</div> |
| 1190 |
|
| 1191 |
<div class="sui-row"> |
| 1192 |
<label for="preload_public_tax" class="sui-toggle"> |
| 1193 |
<input |
| 1194 |
type="checkbox" |
| 1195 |
id="preload_public_tax" |
| 1196 |
name="preload_public_tax" |
| 1197 |
aria-labelledby="preload_public_tax_label" |
| 1198 |
aria-describedby="preload_public_tax_description" |
| 1199 |
value="1" |
| 1200 |
<?php checked( 1, $settings['preload_public_tax'] ); ?> |
| 1201 |
> |
| 1202 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1203 |
<span id="preload_public_tax_label" class="sui-toggle-label"><?php esc_html_e( 'Enable for public taxonomies', 'powered-cache' ); ?></span> |
| 1204 |
<span id="preload_public_tax_description" class="sui-description"><?php esc_html_e( 'Preload archive pages of taxonomies. (tags, category etc..)', 'powered-cache' ); ?></span> |
| 1205 |
</label> |
| 1206 |
</div> |
| 1207 |
</div> |
| 1208 |
|
| 1209 |
</div> |
| 1210 |
</div> |
| 1211 |
</div> |
| 1212 |
</div> |
| 1213 |
|
| 1214 |
<!-- Sitemap preloading settings sui-disabled add to box --> |
| 1215 |
<div id="enable_sitemap_preload_wrapper" style=" <?php echo( ! $settings['enable_cache_preload'] ? 'display:none' : '' ); ?>" tabindex="0"> |
| 1216 |
<div class="sui-box-settings-row <?php echo( ! is_premium() ? 'sui-disabled' : '' ); ?>"> |
| 1217 |
<div class="sui-box-settings-col-1"> |
| 1218 |
<span class="sui-settings-label"><?php esc_html_e( 'Sitemap Preloading', 'powered-cache' ); ?> |
| 1219 |
<?php if ( ! is_premium() ) : ?> |
| 1220 |
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Premium', 'powered-cache' ); ?></span> |
| 1221 |
<?php endif; ?> |
| 1222 |
</span> |
| 1223 |
<span class="sui-description"><?php esc_html_e( 'Preloads sitemaps and the URLs placed in sitemaps.', 'powered-cache' ); ?></span> |
| 1224 |
|
| 1225 |
</div> |
| 1226 |
|
| 1227 |
<div class="sui-box-settings-col-2"> |
| 1228 |
<div class="sui-row"> |
| 1229 |
<label for="enable_sitemap_preload" class="sui-toggle"> |
| 1230 |
<input |
| 1231 |
type="checkbox" |
| 1232 |
id="enable_sitemap_preload" |
| 1233 |
name="enable_sitemap_preload" |
| 1234 |
aria-labelledby="enable_sitemap_preload_label" |
| 1235 |
aria-describedby="enable_sitemap_preload_description" |
| 1236 |
aria-controls="sitemap-preload-details" |
| 1237 |
value="1" |
| 1238 |
<?php checked( 1, $settings['enable_sitemap_preload'] ); ?> |
| 1239 |
> |
| 1240 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1241 |
<span id="enable_sitemap_preload_label" class="sui-toggle-label"><?php esc_html_e( 'Enable Sitemap Preloading', 'powered-cache' ); ?></span> |
| 1242 |
<span id="enable_sitemap_preload_description" class="sui-description"><?php esc_html_e( 'We automatically detect sitemaps generated by Yoast SEO, All-in-one-SEO, Rank Math SEO, SEOPress.', 'powered-cache' ); ?></span> |
| 1243 |
</label> |
| 1244 |
</div> |
| 1245 |
|
| 1246 |
<div class="sui-row"> |
| 1247 |
<div class="sui-col-md-8"> |
| 1248 |
<div class="sui-form-field"> |
| 1249 |
<label for="preload_sitemap" class="sui-label"><i><?php esc_html_e( 'Enter sitemap URLs (one per line)', 'powered-cache' ); ?></i></label> |
| 1250 |
<textarea |
| 1251 |
placeholder="http://example.com/sitemap.xml" |
| 1252 |
id="preload_sitemap" |
| 1253 |
name="preload_sitemap" |
| 1254 |
class="sui-form-control" |
| 1255 |
aria-describedby="preload_sitemap_description" |
| 1256 |
rows="7" |
| 1257 |
><?php echo esc_textarea( $settings['preload_sitemap'] ); ?></textarea> |
| 1258 |
<span id="preload_sitemap_description" class="sui-description"> |
| 1259 |
<?php esc_html_e( 'Preload the urls in listed sitemaps.', 'powered-cache' ); ?> |
| 1260 |
(<a href="<?php echo esc_url( get_doc_url( '/sitemap-preloading/' ) ); ?>" target="_blank">?</a>) |
| 1261 |
</span> |
| 1262 |
</div> |
| 1263 |
|
| 1264 |
</div> |
| 1265 |
</div> |
| 1266 |
</div> |
| 1267 |
</div> |
| 1268 |
</div> |
| 1269 |
|
| 1270 |
<!-- Mobile Cache settings --> |
| 1271 |
<div class="sui-box-settings-row"> |
| 1272 |
<div class="sui-box-settings-col-1"> |
| 1273 |
<span class="sui-settings-label"><?php esc_html_e( 'Prefetch DNS', 'powered-cache' ); ?></span> |
| 1274 |
<span class="sui-description"><?php esc_html_e( 'DNS-prefetch is an attempt to resolve domain names before resources get requested.', 'powered-cache' ); ?></span> |
| 1275 |
</div> |
| 1276 |
|
| 1277 |
<div class="sui-box-settings-col-2"> |
| 1278 |
<div class="sui-row"> |
| 1279 |
<div class="sui-col-md-8"> |
| 1280 |
<div class="sui-form-field"> |
| 1281 |
<label for="prefetch_dns" class="sui-label"><i><?php esc_html_e( 'Enter external hosts to be prefetched (one per line)', 'powered-cache' ); ?></i></label> |
| 1282 |
<textarea |
| 1283 |
placeholder="https://fonts.googleapis.com" |
| 1284 |
id="prefetch_dns" |
| 1285 |
name="prefetch_dns" |
| 1286 |
class="sui-form-control" |
| 1287 |
aria-describedby="prefetch_dns_description" |
| 1288 |
rows="7" |
| 1289 |
><?php echo esc_textarea( $settings['prefetch_dns'] ); ?></textarea> |
| 1290 |
<span id="prefetch_dns_description" class="sui-description"> |
| 1291 |
<?php esc_html_e( 'DNS-prefetch would reduce DNS lookup time.', 'powered-cache' ); ?> |
| 1292 |
(<a href="<?php echo esc_url( get_doc_url( '/prefetch-dns/' ) ); ?>" target="_blank">?</a>) |
| 1293 |
</span> |
| 1294 |
</div> |
| 1295 |
</div> |
| 1296 |
</div> |
| 1297 |
</div> |
| 1298 |
</div> |
| 1299 |
|
| 1300 |
</div> |
| 1301 |
<div class="sui-box-footer"> |
| 1302 |
<div class="sui-actions-left"> |
| 1303 |
<button type="submit" name="powered_cache_form_action" value="save_settings" class="sui-button sui-button-blue"> |
| 1304 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 1305 |
<?php esc_html_e( 'Update settings', 'powered-cache' ); ?> |
| 1306 |
</button> |
| 1307 |
</div> |
| 1308 |
</div> |
| 1309 |
</div> |
| 1310 |
|
| 1311 |
<!-- TAB: Dashed --> |
| 1312 |
<div id="db-optimization" data-tab="db-optimization" style="display: none;"> |
| 1313 |
<div class="box-advanced-db sui-box"> |
| 1314 |
<?php $db_info = \PoweredCache\Async\DatabaseOptimizer::get_db_cleanup_counts(); ?> |
| 1315 |
<div class="sui-box-header"> |
| 1316 |
<h2 class="sui-box-title"><?php esc_html_e( 'Database Optimization', 'powered-cache' ); ?></h2> |
| 1317 |
</div> |
| 1318 |
|
| 1319 |
<div class="sui-box-body"> |
| 1320 |
|
| 1321 |
<?php if ( POWERED_CACHE_IS_NETWORK && wp_is_large_network() ) : ?> |
| 1322 |
<div class="sui-notice sui-notice-red"> |
| 1323 |
<div class="sui-notice-content"> |
| 1324 |
<div class="sui-notice-message"> |
| 1325 |
<span class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></span> |
| 1326 |
<p><?php esc_html_e( 'It seems Powered Cache has been enabled on a large multisite network. Cleanup counts might be slightly different from than actual value due to the volume of the sites in the network.', 'powered-cache' ); ?></p> |
| 1327 |
</div> |
| 1328 |
</div> |
| 1329 |
</div> |
| 1330 |
<?php endif; ?> |
| 1331 |
|
| 1332 |
<div class="sui-box-settings-row"> |
| 1333 |
<div class="sui-box-settings-col-1"> |
| 1334 |
<span class="sui-settings-label"><?php esc_html_e( 'Post Cleanup', 'powered-cache' ); ?></span> |
| 1335 |
</div> |
| 1336 |
|
| 1337 |
<div class="sui-box-settings-col-2"> |
| 1338 |
<div class="sui-row"> |
| 1339 |
<div class="sui-form-field"> |
| 1340 |
<label for="db_cleanup_post_revisions" class="sui-toggle"> |
| 1341 |
<input |
| 1342 |
type="checkbox" |
| 1343 |
id="db_cleanup_post_revisions" |
| 1344 |
name="db_cleanup_post_revisions" |
| 1345 |
aria-labelledby="db_cleanup_post_revisions_label" |
| 1346 |
aria-describedby="db_cleanup_post_revisions_description" |
| 1347 |
value="1" |
| 1348 |
<?php checked( 1, $settings['db_cleanup_post_revisions'] ); ?> |
| 1349 |
> |
| 1350 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1351 |
<span id="db_cleanup_post_revisions_label" class="sui-toggle-label"><?php esc_html_e( 'Post Revisions', 'powered-cache' ); ?> |
| 1352 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Delete post revisions.', 'powered-cache' ); ?>"> |
| 1353 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1354 |
</span> |
| 1355 |
</span> |
| 1356 |
<span id="db_cleanup_post_revisions_description" class="sui-description"><?php printf( esc_html__( '%s revisions in database', 'powered-cache' ), absint( $db_info['db_cleanup_post_revisions'] ) ); ?></span> |
| 1357 |
</label> |
| 1358 |
</div> |
| 1359 |
</div> |
| 1360 |
|
| 1361 |
<div class="sui-row"> |
| 1362 |
<div class="sui-form-field"> |
| 1363 |
<label for="db_cleanup_auto_drafts" class="sui-toggle"> |
| 1364 |
<input |
| 1365 |
type="checkbox" |
| 1366 |
id="db_cleanup_auto_drafts" |
| 1367 |
name="db_cleanup_auto_drafts" |
| 1368 |
aria-labelledby="db_cleanup_auto_drafts_label" |
| 1369 |
aria-describedby="db_cleanup_auto_drafts_description" |
| 1370 |
value="1" |
| 1371 |
<?php checked( 1, $settings['db_cleanup_auto_drafts'] ); ?> |
| 1372 |
> |
| 1373 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1374 |
<span id="db_cleanup_auto_drafts_label" class="sui-toggle-label"><?php esc_html_e( 'Auto Drafts', 'powered-cache' ); ?> |
| 1375 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Delete auto-draft posts.', 'powered-cache' ); ?>"> |
| 1376 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1377 |
</span> |
| 1378 |
</span> |
| 1379 |
<span id="db_cleanup_auto_drafts_description" class="sui-description"><?php printf( esc_html__( '%s auto-draft in database', 'powered-cache' ), absint( $db_info['db_cleanup_auto_drafts'] ) ); ?></span> |
| 1380 |
</label> |
| 1381 |
</div> |
| 1382 |
</div> |
| 1383 |
|
| 1384 |
<div class="sui-row"> |
| 1385 |
<div class="sui-form-field"> |
| 1386 |
<label for="db_cleanup_trashed_posts" class="sui-toggle"> |
| 1387 |
<input |
| 1388 |
type="checkbox" |
| 1389 |
id="db_cleanup_trashed_posts" |
| 1390 |
name="db_cleanup_trashed_posts" |
| 1391 |
aria-labelledby="db_cleanup_trashed_posts_label" |
| 1392 |
aria-describedby="db_cleanup_trashed_posts_description" |
| 1393 |
value="1" |
| 1394 |
<?php checked( 1, $settings['db_cleanup_trashed_posts'] ); ?> |
| 1395 |
> |
| 1396 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1397 |
<span id="db_cleanup_trashed_posts_label" class="sui-toggle-label"><?php esc_html_e( 'Trashed Posts', 'powered-cache' ); ?> |
| 1398 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Permanently delete trashed posts.', 'powered-cache' ); ?>"> |
| 1399 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1400 |
</span> |
| 1401 |
</span> |
| 1402 |
<span id="db_cleanup_trashed_posts_description" class="sui-description"><?php printf( esc_html__( '%s trashed post in database', 'powered-cache' ), absint( $db_info['db_cleanup_trashed_posts'] ) ); ?></span> |
| 1403 |
</label> |
| 1404 |
</div> |
| 1405 |
</div> |
| 1406 |
|
| 1407 |
</div> |
| 1408 |
</div> |
| 1409 |
<div class="sui-box-settings-row"> |
| 1410 |
<div class="sui-box-settings-col-1"> |
| 1411 |
<span class="sui-settings-label"><?php esc_html_e( 'Comments Cleanup', 'powered-cache' ); ?></span> |
| 1412 |
</div> |
| 1413 |
|
| 1414 |
<div class="sui-box-settings-col-2"> |
| 1415 |
<div class="sui-row"> |
| 1416 |
<div class="sui-form-field"> |
| 1417 |
<label for="db_cleanup_spam_comments" class="sui-toggle"> |
| 1418 |
<input |
| 1419 |
type="checkbox" |
| 1420 |
id="db_cleanup_spam_comments" |
| 1421 |
name="db_cleanup_spam_comments" |
| 1422 |
aria-labelledby="db_cleanup_spam_comments_label" |
| 1423 |
aria-describedby="db_cleanup_spam_comments_description" |
| 1424 |
value="1" |
| 1425 |
<?php checked( 1, $settings['db_cleanup_spam_comments'] ); ?> |
| 1426 |
> |
| 1427 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1428 |
<span id="db_cleanup_spam_comments_label" class="sui-toggle-label"><?php esc_html_e( 'Spam Comments', 'powered-cache' ); ?> |
| 1429 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Comments marked as spam that haven\'t been deleted yet.', 'powered-cache' ); ?>"> |
| 1430 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1431 |
</span> |
| 1432 |
</span> |
| 1433 |
<span id="db_cleanup_spam_comments_description" class="sui-description"><?php printf( esc_html__( '%s spam comment in database', 'powered-cache' ), absint( $db_info['db_cleanup_spam_comments'] ) ); ?></span> |
| 1434 |
</label> |
| 1435 |
</div> |
| 1436 |
</div> |
| 1437 |
<div class="sui-row"> |
| 1438 |
<div class="sui-form-field"> |
| 1439 |
<label for="db_cleanup_trashed_comments" class="sui-toggle"> |
| 1440 |
<input |
| 1441 |
type="checkbox" |
| 1442 |
id="db_cleanup_trashed_comments" |
| 1443 |
name="db_cleanup_trashed_comments" |
| 1444 |
aria-labelledby="db_cleanup_trashed_comments_label" |
| 1445 |
aria-describedby="db_cleanup_trashed_comments_description" |
| 1446 |
value="1" |
| 1447 |
<?php checked( 1, $settings['db_cleanup_trashed_comments'] ); ?> |
| 1448 |
> |
| 1449 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1450 |
<span id="db_cleanup_trashed_comments_label" class="sui-toggle-label"><?php esc_html_e( 'Trashed Comments', 'powered-cache' ); ?> |
| 1451 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Permanently delete trashed comments.', 'powered-cache' ); ?>"> |
| 1452 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1453 |
</span> |
| 1454 |
</span> |
| 1455 |
<span id="db_cleanup_trashed_comments_description" class="sui-description"><?php printf( esc_html__( '%s trashed comment in database', 'powered-cache' ), absint( $db_info['db_cleanup_trashed_comments'] ) ); ?></span> |
| 1456 |
</label> |
| 1457 |
</div> |
| 1458 |
</div> |
| 1459 |
</div> |
| 1460 |
</div> |
| 1461 |
<div class="sui-box-settings-row"> |
| 1462 |
<div class="sui-box-settings-col-1"> |
| 1463 |
<span class="sui-settings-label"><?php esc_html_e( 'Transients Cleanup', 'powered-cache' ); ?></span> |
| 1464 |
</div> |
| 1465 |
|
| 1466 |
<div class="sui-box-settings-col-2"> |
| 1467 |
<div class="sui-row"> |
| 1468 |
<div class="sui-form-field"> |
| 1469 |
<label for="db_cleanup_expired_transients" class="sui-toggle"> |
| 1470 |
<input |
| 1471 |
type="checkbox" |
| 1472 |
id="db_cleanup_expired_transients" |
| 1473 |
name="db_cleanup_expired_transients" |
| 1474 |
aria-labelledby="db_cleanup_expired_transients_label" |
| 1475 |
aria-describedby="db_cleanup_expired_transients_description" |
| 1476 |
value="1" |
| 1477 |
<?php checked( 1, $settings['db_cleanup_expired_transients'] ); ?> |
| 1478 |
> |
| 1479 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1480 |
<span id="db_cleanup_expired_transients_label" class="sui-toggle-label"><?php esc_html_e( 'Expired Transients', 'powered-cache' ); ?> |
| 1481 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Permanently delete expired transients.', 'powered-cache' ); ?>"> |
| 1482 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1483 |
</span> |
| 1484 |
</span> |
| 1485 |
<span id="db_cleanup_expired_transients_description" class="sui-description"><?php printf( esc_html__( '%s expired transient in database', 'powered-cache' ), absint( $db_info['db_cleanup_expired_transients'] ) ); ?></span> |
| 1486 |
</label> |
| 1487 |
</div> |
| 1488 |
|
| 1489 |
</div> |
| 1490 |
<div class="sui-row"> |
| 1491 |
<div class="sui-form-field"> |
| 1492 |
<label for="db_cleanup_all_transients" class="sui-toggle"> |
| 1493 |
<input |
| 1494 |
type="checkbox" |
| 1495 |
id="db_cleanup_all_transients" |
| 1496 |
name="db_cleanup_all_transients" |
| 1497 |
aria-labelledby="db_cleanup_all_transients_label" |
| 1498 |
aria-describedby="db_cleanup_all_transients_description" |
| 1499 |
value="1" |
| 1500 |
<?php checked( 1, $settings['db_cleanup_all_transients'] ); ?> |
| 1501 |
> |
| 1502 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1503 |
<span id="db_cleanup_all_transients_label" class="sui-toggle-label"><?php esc_html_e( 'All Transients', 'powered-cache' ); ?> |
| 1504 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Permanently delete all transients.', 'powered-cache' ); ?>"> |
| 1505 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1506 |
</span> |
| 1507 |
</span> |
| 1508 |
<span id="db_cleanup_all_transients_description" class="sui-description"><?php printf( esc_html__( '%s expired transient in database', 'powered-cache' ), absint( $db_info['db_cleanup_all_transients'] ) ); ?></span> |
| 1509 |
</label> |
| 1510 |
</div> |
| 1511 |
</div> |
| 1512 |
|
| 1513 |
</div> |
| 1514 |
</div> |
| 1515 |
<div class="sui-box-settings-row"> |
| 1516 |
<div class="sui-box-settings-col-1"> |
| 1517 |
<span class="sui-settings-label"><?php esc_html_e( 'Database Optimize', 'powered-cache' ); ?></span> |
| 1518 |
</div> |
| 1519 |
|
| 1520 |
<div class="sui-box-settings-col-2"> |
| 1521 |
<div class="sui-row"> |
| 1522 |
<div class="sui-form-field"> |
| 1523 |
<label for="db_cleanup_optimize_tables" class="sui-toggle"> |
| 1524 |
<input |
| 1525 |
type="checkbox" |
| 1526 |
id="db_cleanup_optimize_tables" |
| 1527 |
name="db_cleanup_optimize_tables" |
| 1528 |
aria-labelledby="db_cleanup_optimize_tables_label" |
| 1529 |
aria-describedby="db_cleanup_optimize_tables_description" |
| 1530 |
value="1" |
| 1531 |
<?php checked( 1, $settings['db_cleanup_optimize_tables'] ); ?> |
| 1532 |
> |
| 1533 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1534 |
<span id="db_cleanup_optimize_tables_label" class="sui-toggle-label"><?php esc_html_e( 'Optimize Tables', 'powered-cache' ); ?> |
| 1535 |
<span class="sui-tooltip sui-tooltip-constrained" data-tooltip="<?php esc_html_e( 'Reduces overhead of database tables.', 'powered-cache' ); ?>"> |
| 1536 |
<i class="sui-icon-info" aria-hidden="true"></i> |
| 1537 |
</span> |
| 1538 |
</span> |
| 1539 |
<span id="db_cleanup_optimize_tables_description" class="sui-description"><?php printf( esc_html__( '%s tables to optimize', 'powered-cache' ), absint( $db_info['db_cleanup_optimize_tables'] ) ); ?></span> |
| 1540 |
</label> |
| 1541 |
</div> |
| 1542 |
</div> |
| 1543 |
|
| 1544 |
</div> |
| 1545 |
</div> |
| 1546 |
<div class="sui-box-settings-row <?php echo( ! is_premium() ? 'sui-disabled' : '' ); ?>"> |
| 1547 |
<div class="sui-box-settings-col-1"> |
| 1548 |
<span class="sui-settings-label"><?php esc_html_e( 'Schedule Cleanups', 'powered-cache' ); ?> |
| 1549 |
<?php if ( ! is_premium() ) : ?> |
| 1550 |
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Premium', 'powered-cache' ); ?></span> |
| 1551 |
<?php endif; ?> |
| 1552 |
</span> |
| 1553 |
<span class="sui-description"> |
| 1554 |
<?php esc_html_e( 'Schedule Powered Cache to automatically clean your database daily, weekly or monthly.', 'powered-cache' ); ?> |
| 1555 |
</span> |
| 1556 |
</div><!-- end col-third --> |
| 1557 |
|
| 1558 |
<div class="sui-box-settings-col-2"> |
| 1559 |
<div class="sui-form-field"> |
| 1560 |
<label for="enable_scheduled_db_cleanup" class="sui-toggle"> |
| 1561 |
<input |
| 1562 |
type="checkbox" |
| 1563 |
id="enable_scheduled_db_cleanup" |
| 1564 |
name="enable_scheduled_db_cleanup" |
| 1565 |
aria-labelledby="enable_scheduled_db_cleanup_label" |
| 1566 |
value="1" |
| 1567 |
aria-controls="scheduled_db_cleanup_details" |
| 1568 |
<?php checked( 1, $settings['enable_scheduled_db_cleanup'] ); ?> |
| 1569 |
> |
| 1570 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1571 |
<span id="scheduled_cleanup-label" class="sui-toggle-label"><?php esc_html_e( 'Enabled scheduled cleanups', 'powered-cache' ); ?></span> |
| 1572 |
</label> |
| 1573 |
|
| 1574 |
<div id="scheduled_db_cleanup_details" class="sui-border-frame with-padding schedule-box" style="<?php echo( ! $settings['enable_scheduled_db_cleanup'] ? 'display:none' : '' ); ?>"> |
| 1575 |
<div class="sui-form-field"> |
| 1576 |
|
| 1577 |
<label class="sui-label" for="scheduled_db_cleanup_frequency"><?php esc_html_e( 'Frequency', 'powered-cache' ); ?></label> |
| 1578 |
|
| 1579 |
<select id="scheduled_db_cleanup_frequency" name="scheduled_db_cleanup_frequency" class="sui-select"> |
| 1580 |
<?php foreach ( scheduled_cleanup_frequency_options() as $frequency => $frequency_name ) : ?> |
| 1581 |
<option <?php selected( $settings['scheduled_db_cleanup_frequency'], $frequency ); ?> value="<?php echo esc_attr( $frequency ); ?>"><?php echo esc_html( $frequency_name ); ?></option> |
| 1582 |
<?php endforeach; ?> |
| 1583 |
</select> |
| 1584 |
</div> |
| 1585 |
</div> |
| 1586 |
</div> |
| 1587 |
</div> |
| 1588 |
</div> |
| 1589 |
<?php if ( ! is_premium() ) : ?> |
| 1590 |
<div class="sui-box-settings-row sui-upsell-row"> |
| 1591 |
<div class="sui-upsell-notice"> |
| 1592 |
<p> |
| 1593 |
<?php esc_html_e( 'Regular cleanups of your database ensures you’re regularly removing extra bloat which can slow down your host server. Upgrade to Premium to unlock this feature today!', 'powered-cache' ); ?> |
| 1594 |
<br> |
| 1595 |
<a href="https://poweredcache.com/?utm_source=poweredcache&utm_medium=plugin&utm_campaign=dbcleanup_schedule_upgrade_button" target="_blank"> |
| 1596 |
<?php esc_html_e( 'Learn More', 'powered-cache' ); ?> |
| 1597 |
</a> |
| 1598 |
</p> |
| 1599 |
</div> |
| 1600 |
</div> |
| 1601 |
<?php endif; ?> |
| 1602 |
</div> |
| 1603 |
<div class="sui-box-footer"> |
| 1604 |
|
| 1605 |
<div class="sui-actions-left"> |
| 1606 |
<button type="submit" name="powered_cache_form_action" value="save_settings_and_optimize" class="sui-button sui-button-blue" id="powered-cache-save-settings-db-optimize"> |
| 1607 |
<i class="sui-icon-save" aria-hidden="true"></i> |
| 1608 |
<?php esc_html_e( 'Save settings and Optimize', 'powered-cache' ); ?> |
| 1609 |
</button> |
| 1610 |
<span class="sui-tag sui-tag-yellow"><?php esc_html_e( 'Tip: Make sure you have a current backup before running a cleanup.', 'powered-cache' ); ?></span> |
| 1611 |
|
| 1612 |
</div> |
| 1613 |
|
| 1614 |
</div> |
| 1615 |
</div> |
| 1616 |
</div> |
| 1617 |
|
| 1618 |
<!-- TAB: Dashed --> |
| 1619 |
<div id="extensions" data-tab="extensions" style="display: none;"> |
| 1620 |
<div class="sui-row"> |
| 1621 |
<div class="sui-col-lg-6"> |
| 1622 |
<div id="extension-cloudflare" class="powered-cache-extension-box sui-box"> |
| 1623 |
<div class="sui-box-header"> |
| 1624 |
<h3 class="sui-box-title"><?php esc_html_e( 'Cloudflare', 'powered-cache' ); ?></h3> |
| 1625 |
<div class="sui-actions-right"> |
| 1626 |
<div class="sui-form-field"> |
| 1627 |
<label for="enable_cloudflare" class="sui-toggle"> |
| 1628 |
<input |
| 1629 |
type="checkbox" |
| 1630 |
id="enable_cloudflare" |
| 1631 |
name="enable_cloudflare" |
| 1632 |
aria-labelledby="enable_cloudflare_label" |
| 1633 |
value="1" |
| 1634 |
aria-controls="cloudflare-details" |
| 1635 |
<?php checked( 1, $settings['enable_cloudflare'] ); ?> |
| 1636 |
> |
| 1637 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1638 |
<span id="enable_cloudflare_label" class="sui-toggle-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1639 |
</label> |
| 1640 |
</div> |
| 1641 |
</div> |
| 1642 |
</div><!-- end sui-box-title --> |
| 1643 |
|
| 1644 |
<div class="sui-box-body"> |
| 1645 |
<p><?php esc_html_e( 'Cloudflare extension for PoweredCache. It allows to purge Cloudflare cache within WordPress.', 'powered-cache' ); ?></p> |
| 1646 |
<div id="cloudflare-details" style="<?php echo( ! $settings['enable_cloudflare'] ? 'display:none' : '' ); ?>"> |
| 1647 |
<div class="sui-form-field"> |
| 1648 |
|
| 1649 |
<label for="cloudflare-email" id="cloudflare-email-label" class="sui-label"><?php esc_html_e( 'Cloudflare Email', 'powered-cache' ); ?></label> |
| 1650 |
<input |
| 1651 |
placeholder="john@example.com" |
| 1652 |
name="cloudflare_email" |
| 1653 |
value="<?php echo esc_attr( $settings['cloudflare_email'] ); ?>" |
| 1654 |
id="cloudflare-email" |
| 1655 |
class="sui-form-control" |
| 1656 |
/> |
| 1657 |
</div> |
| 1658 |
|
| 1659 |
<div class="sui-form-field"> |
| 1660 |
|
| 1661 |
<label for="cloudflare-api-key" id="cloudflare-api-key-label" class="sui-label"><?php esc_html_e( 'API Key', 'powered-cache' ); ?></label> |
| 1662 |
|
| 1663 |
<input |
| 1664 |
name="cloudflare_api_key" |
| 1665 |
value="<?php echo esc_attr( $settings['cloudflare_api_key'] ); ?>" |
| 1666 |
id="cloudflare-api-key" |
| 1667 |
class="sui-form-control" |
| 1668 |
type="password" |
| 1669 |
/> |
| 1670 |
</div> |
| 1671 |
|
| 1672 |
<div class="sui-form-field"> |
| 1673 |
|
| 1674 |
<label for="cloudflare-zone" id="cloudflare-zone-label" class="sui-label"><?php esc_html_e( 'Zone ID', 'powered-cache' ); ?></label> |
| 1675 |
|
| 1676 |
<input |
| 1677 |
name="cloudflare_zone" |
| 1678 |
value="<?php echo esc_attr( $settings['cloudflare_zone'] ); ?>" |
| 1679 |
id="cloudflare-zone" |
| 1680 |
class="sui-form-control" |
| 1681 |
/> |
| 1682 |
</div> |
| 1683 |
</div> |
| 1684 |
</div><!-- end box_content_class --> |
| 1685 |
</div> |
| 1686 |
</div> |
| 1687 |
<div class="sui-col-lg-6"> |
| 1688 |
<div id="extension-heartbeat" class="powered-cache-extension-box sui-box"> |
| 1689 |
<div class="sui-box-header"> |
| 1690 |
<h3 class="sui-box-title"><?php esc_html_e( 'Heartbeat', 'powered-cache' ); ?></h3> |
| 1691 |
<div class="sui-actions-right"> |
| 1692 |
<div class="sui-form-field"> |
| 1693 |
<label for="enable_heartbeat" class="sui-toggle"> |
| 1694 |
<input |
| 1695 |
type="checkbox" |
| 1696 |
id="enable_heartbeat" |
| 1697 |
name="enable_heartbeat" |
| 1698 |
aria-labelledby="enable_heartbeat_label" |
| 1699 |
value="1" |
| 1700 |
aria-controls="heartbeat-details" |
| 1701 |
<?php checked( 1, $settings['enable_heartbeat'] ); ?> |
| 1702 |
> |
| 1703 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1704 |
<span id="enable_heartbeat_label" class="sui-toggle-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1705 |
</label> |
| 1706 |
</div> |
| 1707 |
</div> |
| 1708 |
</div><!-- end sui-box-title --> |
| 1709 |
|
| 1710 |
<div class="sui-box-body"> |
| 1711 |
<p><?php esc_html_e( 'Heartbeat extension allows you to manage the frequency of the WordPress Heartbeat API.', 'powered-cache' ); ?></p> |
| 1712 |
<div id="heartbeat-details" style="<?php echo( ! $settings['enable_heartbeat'] ? 'display:none' : '' ); ?>"> |
| 1713 |
<h4><?php esc_html_e( 'Dashboard', 'powered-cache' ); ?></h4> |
| 1714 |
|
| 1715 |
<!-- start dashboard heartbeat --> |
| 1716 |
<div class="sui-form-field" role="radiogroup"> |
| 1717 |
<label for="heartbeat-dashboard-enable" class="sui-radio"> |
| 1718 |
<input |
| 1719 |
type="radio" |
| 1720 |
name="heartbeat_dashboard_status" |
| 1721 |
id="heartbeat-dashboard-enable" |
| 1722 |
value="enable" |
| 1723 |
class="heartbeat_radio" |
| 1724 |
aria-controls="heartbeat-dashboard-interval-control" |
| 1725 |
<?php checked( 'enable', $settings['heartbeat_dashboard_status'] ); ?> |
| 1726 |
/> |
| 1727 |
<span aria-hidden="true"></span> |
| 1728 |
<span id="heartbeat-dashboard-enable-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1729 |
</label> |
| 1730 |
|
| 1731 |
<label for="heartbeat-dashboard-disable" class="sui-radio"> |
| 1732 |
<input |
| 1733 |
type="radio" |
| 1734 |
name="heartbeat_dashboard_status" |
| 1735 |
id="heartbeat-dashboard-disable" |
| 1736 |
value="disable" |
| 1737 |
class="heartbeat_radio" |
| 1738 |
aria-controls="heartbeat-dashboard-interval-control" |
| 1739 |
<?php checked( 'disable', $settings['heartbeat_dashboard_status'] ); ?> |
| 1740 |
/> |
| 1741 |
<span aria-hidden="true"></span> |
| 1742 |
<span id="heartbeat-dashboard-disable-label"><?php esc_html_e( 'Disable', 'powered-cache' ); ?></span> |
| 1743 |
</label> |
| 1744 |
|
| 1745 |
<label for="heartbeat-dashboard-modify" class="sui-radio"> |
| 1746 |
<input |
| 1747 |
type="radio" |
| 1748 |
name="heartbeat_dashboard_status" |
| 1749 |
id="heartbeat-dashboard-modify" |
| 1750 |
value="modify" |
| 1751 |
aria-controls="heartbeat-dashboard-interval-control" |
| 1752 |
class="heartbeat_radio" |
| 1753 |
<?php checked( 'modify', $settings['heartbeat_dashboard_status'] ); ?> |
| 1754 |
/> |
| 1755 |
<span aria-hidden="true"></span> |
| 1756 |
<span id="heartbeat-dashboard-modify-label"><?php esc_html_e( 'Modify', 'powered-cache' ); ?></span> |
| 1757 |
</label> |
| 1758 |
</div> |
| 1759 |
<div id="heartbeat-dashboard-interval-control" style="<?php echo( ! ( 'modify' === $settings['heartbeat_dashboard_status'] ) ? 'display:none' : '' ); ?>"> |
| 1760 |
<label for="heartbeat-dashboard" id="heartbeat-dashboard-label" class="sui-label"><?php esc_html_e( 'Heartbeat Interval for Dashboard', 'powered-cache' ); ?></label> |
| 1761 |
<div class="sui-form-field"> |
| 1762 |
<input |
| 1763 |
name="heartbeat_dashboard_interval" |
| 1764 |
value="<?php echo esc_attr( $settings['heartbeat_dashboard_interval'] ); ?>" |
| 1765 |
id="heartbeat_dashboard_interval" |
| 1766 |
class="sui-form-control" |
| 1767 |
type="number" |
| 1768 |
min="15" |
| 1769 |
max="120" |
| 1770 |
/> |
| 1771 |
</div> |
| 1772 |
</div> |
| 1773 |
<!-- end dashboard heartbeat --> |
| 1774 |
|
| 1775 |
<h4><?php esc_html_e( 'Post Editor', 'powered-cache' ); ?></h4> |
| 1776 |
|
| 1777 |
<!-- start post editor heartbeat --> |
| 1778 |
<div class="sui-form-field" role="radiogroup"> |
| 1779 |
<label for="heartbeat-editor-enable" class="sui-radio"> |
| 1780 |
<input |
| 1781 |
type="radio" |
| 1782 |
name="heartbeat_editor_status" |
| 1783 |
id="heartbeat-editor-enable" |
| 1784 |
value="enable" |
| 1785 |
class="heartbeat_radio" |
| 1786 |
aria-controls="heartbeat-editor-interval-control" |
| 1787 |
<?php checked( 'enable', $settings['heartbeat_editor_status'] ); ?> |
| 1788 |
|
| 1789 |
/> |
| 1790 |
<span aria-hidden="true"></span> |
| 1791 |
<span id="heartbeat-editor-enable-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1792 |
</label> |
| 1793 |
|
| 1794 |
<label for="heartbeat-editor-disable" class="sui-radio"> |
| 1795 |
<input |
| 1796 |
type="radio" |
| 1797 |
name="heartbeat_editor_status" |
| 1798 |
id="heartbeat-editor-disable" |
| 1799 |
value="disable" |
| 1800 |
class="heartbeat_radio" |
| 1801 |
aria-controls="heartbeat-editor-interval-control" |
| 1802 |
<?php checked( 'disable', $settings['heartbeat_editor_status'] ); ?> |
| 1803 |
|
| 1804 |
/> |
| 1805 |
<span aria-hidden="true"></span> |
| 1806 |
<span id="heartbeat-editor-disable-label"><?php esc_html_e( 'Disable', 'powered-cache' ); ?></span> |
| 1807 |
</label> |
| 1808 |
|
| 1809 |
<label for="heartbeat-editor-modify" class="sui-radio"> |
| 1810 |
<input |
| 1811 |
type="radio" |
| 1812 |
name="heartbeat_editor_status" |
| 1813 |
id="heartbeat-editor-modify" |
| 1814 |
value="modify" |
| 1815 |
aria-controls="heartbeat-editor-interval-control" |
| 1816 |
class="heartbeat_radio" |
| 1817 |
<?php checked( 'modify', $settings['heartbeat_editor_status'] ); ?> |
| 1818 |
|
| 1819 |
/> |
| 1820 |
<span aria-hidden="true"></span> |
| 1821 |
<span id="heartbeat-editor-modify-label"><?php esc_html_e( 'Modify', 'powered-cache' ); ?></span> |
| 1822 |
</label> |
| 1823 |
</div> |
| 1824 |
<div id="heartbeat-editor-interval-control" style="<?php echo( ! ( 'modify' === $settings['heartbeat_editor_status'] ) ? 'display:none' : '' ); ?>"> |
| 1825 |
<label for="heartbeat-editor" id="heartbeat-editor-label" class="sui-label"><?php esc_html_e( 'Heartbeat Interval for Post Editor', 'powered-cache' ); ?></label> |
| 1826 |
<div class="sui-form-field"> |
| 1827 |
<input |
| 1828 |
name="heartbeat_editor_interval" |
| 1829 |
value="<?php echo esc_attr( $settings['heartbeat_editor_interval'] ); ?>" |
| 1830 |
id="heartbeat_editor_interval" |
| 1831 |
class="sui-form-control" |
| 1832 |
type="number" |
| 1833 |
min="15" |
| 1834 |
max="120" |
| 1835 |
/> |
| 1836 |
</div> |
| 1837 |
</div> |
| 1838 |
<!-- end post editor heartbeat --> |
| 1839 |
|
| 1840 |
<h4><?php esc_html_e( 'Frontend', 'powered-cache' ); ?></h4> |
| 1841 |
|
| 1842 |
<!-- start frontend heartbeat --> |
| 1843 |
<div class="sui-form-field" role="radiogroup"> |
| 1844 |
<label for="heartbeat-frontend-enable" class="sui-radio"> |
| 1845 |
<input |
| 1846 |
type="radio" |
| 1847 |
name="heartbeat_frontend_status" |
| 1848 |
id="heartbeat-frontend-enable" |
| 1849 |
value="enable" |
| 1850 |
class="heartbeat_radio" |
| 1851 |
aria-controls="heartbeat-frontend-interval-control" |
| 1852 |
<?php checked( 'enable', $settings['heartbeat_frontend_status'] ); ?> |
| 1853 |
/> |
| 1854 |
<span aria-hidden="true"></span> |
| 1855 |
<span id="heartbeat-frontend-enable-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1856 |
</label> |
| 1857 |
|
| 1858 |
<label for="heartbeat-frontend-disable" class="sui-radio"> |
| 1859 |
<input |
| 1860 |
type="radio" |
| 1861 |
name="heartbeat_frontend_status" |
| 1862 |
id="heartbeat-frontend-disable" |
| 1863 |
value="disable" |
| 1864 |
class="heartbeat_radio" |
| 1865 |
aria-controls="heartbeat-frontend-interval-control" |
| 1866 |
<?php checked( 'disable', $settings['heartbeat_frontend_status'] ); ?> |
| 1867 |
/> |
| 1868 |
<span aria-hidden="true"></span> |
| 1869 |
<span id="heartbeat-frontend-disable-label"><?php esc_html_e( 'Disable', 'powered-cache' ); ?></span> |
| 1870 |
</label> |
| 1871 |
|
| 1872 |
<label for="heartbeat-frontend-modify" class="sui-radio"> |
| 1873 |
<input |
| 1874 |
type="radio" |
| 1875 |
name="heartbeat_frontend_status" |
| 1876 |
id="heartbeat-frontend-modify" |
| 1877 |
value="modify" |
| 1878 |
aria-controls="heartbeat-frontend-interval-control" |
| 1879 |
class="heartbeat_radio" |
| 1880 |
<?php checked( 'modify', $settings['heartbeat_frontend_status'] ); ?> |
| 1881 |
/> |
| 1882 |
<span aria-hidden="true"></span> |
| 1883 |
<span id="heartbeat-frontend-modify-label"><?php esc_html_e( 'Modify', 'powered-cache' ); ?></span> |
| 1884 |
</label> |
| 1885 |
</div> |
| 1886 |
|
| 1887 |
<div id="heartbeat-frontend-interval-control" style="<?php echo( ! ( 'modify' === $settings['heartbeat_frontend_status'] ) ? 'display:none' : '' ); ?>"> |
| 1888 |
<label for="heartbeat-frontend" id="heartbeat-frontend-label" class="sui-label"><?php esc_html_e( 'Heartbeat Interval for Dashboard', 'powered-cache' ); ?></label> |
| 1889 |
<div class="sui-form-field"> |
| 1890 |
<input |
| 1891 |
name="heartbeat_frontend_interval" |
| 1892 |
value="<?php echo esc_attr( $settings['heartbeat_frontend_interval'] ); ?>" |
| 1893 |
id="heartbeat_frontend_interval" |
| 1894 |
class="sui-form-control" |
| 1895 |
type="number" |
| 1896 |
min="15" |
| 1897 |
max="120" |
| 1898 |
/> |
| 1899 |
</div> |
| 1900 |
</div> |
| 1901 |
<!-- end frontend heartbeat --> |
| 1902 |
|
| 1903 |
</div> |
| 1904 |
</div><!-- end box_content_class --> |
| 1905 |
</div> |
| 1906 |
</div> |
| 1907 |
</div> |
| 1908 |
<div class="sui-row"> |
| 1909 |
<div class="sui-col-lg-6"> |
| 1910 |
<div id="extension-varnish" class="powered-cache-extension-box sui-box"> |
| 1911 |
|
| 1912 |
<div class="sui-box-header"> |
| 1913 |
<h3 class="sui-box-title"><?php esc_html_e( 'Varnish', 'powered-cache' ); ?></h3> |
| 1914 |
<?php if ( ! is_premium() ) : ?> |
| 1915 |
<div class="sui-actions-left"> |
| 1916 |
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Premium', 'powered-cache' ); ?></span> |
| 1917 |
</div> |
| 1918 |
<?php endif; ?> |
| 1919 |
<div class="sui-actions-right"> |
| 1920 |
<div class="sui-form-field"> |
| 1921 |
<label for="enable_varnish" class="sui-toggle"> |
| 1922 |
<input |
| 1923 |
<?php echo( ! is_premium() ? 'disabled="disabled"' : '' ); ?> |
| 1924 |
type="checkbox" |
| 1925 |
id="enable_varnish" |
| 1926 |
name="enable_varnish" |
| 1927 |
aria-labelledby="enable_varnish_label" |
| 1928 |
value="1" |
| 1929 |
aria-controls="varnish_details" |
| 1930 |
<?php checked( 1, $settings['enable_varnish'] ); ?> |
| 1931 |
> |
| 1932 |
|
| 1933 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1934 |
<span id="enable_varnish_label" class="sui-toggle-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1935 |
</label> |
| 1936 |
</div> |
| 1937 |
</div> |
| 1938 |
</div><!-- end sui-box-title --> |
| 1939 |
|
| 1940 |
<div class="sui-box-body sui-upsell-items"> |
| 1941 |
<div class="sui-box-settings-row <?php echo( ! is_premium() ? 'sui-disabled' : '' ); ?>"> |
| 1942 |
<div class="sui-box-settings-col"> |
| 1943 |
<p><?php esc_html_e( 'Purge Varnish cache.It\'s recommended when you are using the Varnish server.', 'powered-cache' ); ?></p> |
| 1944 |
|
| 1945 |
<div id="varnish_details" style="<?php echo( ! $settings['enable_varnish'] ? 'display:none' : '' ); ?>"> |
| 1946 |
<div class="sui-form-field"> |
| 1947 |
|
| 1948 |
<label for="varnish_ip" id="varnish-ip-label" class="sui-label"><?php esc_html_e( 'Varnish IP', 'powered-cache' ); ?></label> |
| 1949 |
|
| 1950 |
<input |
| 1951 |
placeholder="127.0.0.1" |
| 1952 |
id="varnish_ip" |
| 1953 |
name="varnish_ip" |
| 1954 |
value="<?php echo esc_attr( $settings['varnish_ip'] ); ?>" |
| 1955 |
class="sui-form-control" |
| 1956 |
/> |
| 1957 |
</div> |
| 1958 |
</div> |
| 1959 |
</div> |
| 1960 |
|
| 1961 |
</div> |
| 1962 |
<?php if ( ! is_premium() ) : ?> |
| 1963 |
<div class="sui-box-settings-row sui-upsell-row"> |
| 1964 |
<div class="sui-upsell-notice" style="padding-left: 0;"> |
| 1965 |
<p><?php esc_html_e( 'With our premium version of Powered Cache you can use Varnish extension and unlock some other speedbooster features.', 'powered-cache' ); ?><br> |
| 1966 |
<button class="sui-button sui-button-purple" style="margin-top: 10px;"><?php esc_html_e( 'Try Premium today', 'powered-cache' ); ?></button> |
| 1967 |
</p> |
| 1968 |
</div> |
| 1969 |
</div> |
| 1970 |
<?php endif; ?> |
| 1971 |
</div><!-- end box_content_class --> |
| 1972 |
|
| 1973 |
</div><!-- end box-dashboard-performance-disabled --> |
| 1974 |
</div> |
| 1975 |
|
| 1976 |
<div class="sui-col-lg-6"> |
| 1977 |
<div id="extension-ga" class="powered-cache-extension-box sui-box"> |
| 1978 |
<div class="sui-box-header"> |
| 1979 |
<h3 class="sui-box-title"><?php esc_html_e( 'Google Tracking', 'powered-cache' ); ?></h3> |
| 1980 |
<?php if ( ! is_premium() ) : ?> |
| 1981 |
<div class="sui-actions-left"> |
| 1982 |
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Premium', 'powered-cache' ); ?></span> |
| 1983 |
</div> |
| 1984 |
<?php endif; ?> |
| 1985 |
<div class="sui-actions-right"> |
| 1986 |
<div class="sui-form-field"> |
| 1987 |
<label for="enable_google_tracking" class="sui-toggle"> |
| 1988 |
<input |
| 1989 |
<?php echo( ! is_premium() ? 'disabled="disabled"' : '' ); ?> |
| 1990 |
type="checkbox" |
| 1991 |
id="enable_google_tracking" |
| 1992 |
name="enable_google_tracking" |
| 1993 |
aria-labelledby="enable_google_tracking_label" |
| 1994 |
value="1" |
| 1995 |
<?php checked( 1, $settings['enable_google_tracking'] ); ?> |
| 1996 |
> |
| 1997 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 1998 |
<span id="enable_cloudflare_label" class="sui-toggle-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 1999 |
</label> |
| 2000 |
</div> |
| 2001 |
</div> |
| 2002 |
</div><!-- end sui-box-title --> |
| 2003 |
|
| 2004 |
<div class="sui-box-body sui-upsell-items"> |
| 2005 |
<div class="sui-box-settings-row <?php echo( ! is_premium() ? 'sui-disabled' : '' ); ?>"> |
| 2006 |
<div class="sui-box-settings-col"> |
| 2007 |
<p><?php esc_html_e( 'Powered Cache will host Google scripts on your server to help satisfy the PageSpeed recommendation for leverage browser caching.', 'powered-cache' ); ?></p> |
| 2008 |
</div> |
| 2009 |
|
| 2010 |
</div> |
| 2011 |
<?php if ( ! is_premium() ) : ?> |
| 2012 |
<div class="sui-box-settings-row sui-upsell-row"> |
| 2013 |
<div class="sui-upsell-notice" style="padding-left: 0;"> |
| 2014 |
<p><?php esc_html_e( 'With our premium version of Powered Cache you can use this extension and unlock some other speedbooster features.', 'powered-cache' ); ?><br> |
| 2015 |
<button class="sui-button sui-button-purple" style="margin-top: 10px;"><?php esc_html_e( 'Try Premium today', 'powered-cache' ); ?></button> |
| 2016 |
</p> |
| 2017 |
</div> |
| 2018 |
</div> |
| 2019 |
<?php endif; ?> |
| 2020 |
</div><!-- end box_content_class --> |
| 2021 |
|
| 2022 |
</div> |
| 2023 |
</div> |
| 2024 |
|
| 2025 |
</div> |
| 2026 |
<div class="sui-row"> |
| 2027 |
<div class="sui-col-lg-6"> |
| 2028 |
<div id="extension-fb-pixel" class="powered-cache-extension-box sui-box"> |
| 2029 |
|
| 2030 |
<div class="sui-box-header"> |
| 2031 |
<h3 class="sui-box-title"><?php esc_html_e( 'Facebook Tracking', 'powered-cache' ); ?></h3> |
| 2032 |
<?php if ( ! is_premium() ) : ?> |
| 2033 |
<div class="sui-actions-left"> |
| 2034 |
<span class="sui-tag sui-tag-pro"><?php esc_html_e( 'Premium', 'powered-cache' ); ?></span> |
| 2035 |
</div> |
| 2036 |
<?php endif; ?> |
| 2037 |
<div class="sui-actions-right"> |
| 2038 |
<div class="sui-form-field"> |
| 2039 |
<label for="enable_fb_tracking" class="sui-toggle"> |
| 2040 |
<input |
| 2041 |
<?php echo( ! is_premium() ? 'disabled="disabled"' : '' ); ?> |
| 2042 |
type="checkbox" |
| 2043 |
id="enable_fb_tracking" |
| 2044 |
name="enable_fb_tracking" |
| 2045 |
aria-labelledby="enable_fb_tracking_label" |
| 2046 |
value="1" |
| 2047 |
<?php checked( 1, $settings['enable_fb_tracking'] ); ?> |
| 2048 |
> |
| 2049 |
|
| 2050 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 2051 |
<span id="enable_fb_tracking_label" class="sui-toggle-label"><?php esc_html_e( 'Enable', 'powered-cache' ); ?></span> |
| 2052 |
</label> |
| 2053 |
</div> |
| 2054 |
</div> |
| 2055 |
</div><!-- end sui-box-title --> |
| 2056 |
|
| 2057 |
<div class="sui-box-body sui-upsell-items"> |
| 2058 |
<div class="sui-box-settings-row <?php echo( ! is_premium() ? 'sui-disabled' : '' ); ?>"> |
| 2059 |
<div class="sui-box-settings-col"> |
| 2060 |
<p><?php esc_html_e( 'Powered Cache will host FB js on your server to help satisfy the PageSpeed recommendation for leverage browser caching.', 'powered-cache' ); ?></p> |
| 2061 |
</div> |
| 2062 |
|
| 2063 |
</div> |
| 2064 |
<?php if ( ! is_premium() ) : ?> |
| 2065 |
<div class="sui-box-settings-row sui-upsell-row"> |
| 2066 |
<div class="sui-upsell-notice" style="padding-left: 0;"> |
| 2067 |
<p><?php esc_html_e( 'With our premium version of Powered Cache you can use this extension and unlock some other speedbooster features.', 'powered-cache' ); ?><br> |
| 2068 |
<button class="sui-button sui-button-purple" style="margin-top: 10px;"><?php esc_html_e( 'Try Premium today', 'powered-cache' ); ?></button> |
| 2069 |
</p> |
| 2070 |
</div> |
| 2071 |
</div> |
| 2072 |
<?php endif; ?> |
| 2073 |
</div><!-- end box_content_class --> |
| 2074 |
|
| 2075 |
</div><!-- end box-dashboard-performance-disabled --> |
| 2076 |
</div> |
| 2077 |
</div> |
| 2078 |
|
| 2079 |
</div> |
| 2080 |
|
| 2081 |
<!-- TAB: Dashed --> |
| 2082 |
<div class="sui-box" id="misc-settings" data-tab="misc-settings" style="display: none;"> |
| 2083 |
|
| 2084 |
<div class="sui-box-header"> |
| 2085 |
<h2 class="sui-box-title"><?php esc_html_e( 'Misc Settings', 'powered-cache' ); ?></h2> |
| 2086 |
</div> |
| 2087 |
|
| 2088 |
<div class="sui-box-body"> |
| 2089 |
<div class="sui-box-settings-row"> |
| 2090 |
<div class="sui-box-settings-col-1"> |
| 2091 |
<span class="sui-settings-label"><?php esc_html_e( 'Cache Footprint', 'powered-cache' ); ?></span> |
| 2092 |
<span class="sui-description"></span> |
| 2093 |
</div> |
| 2094 |
|
| 2095 |
<div class="sui-box-settings-col-2"> |
| 2096 |
<div class="sui-form-field"> |
| 2097 |
<label for="cache_footprint" class="sui-toggle"> |
| 2098 |
<input |
| 2099 |
type="checkbox" |
| 2100 |
id="cache_footprint" |
| 2101 |
name="cache_footprint" |
| 2102 |
aria-labelledby="cache_footprint_label" |
| 2103 |
aria-describedby="enable_cache_footprint_description" |
| 2104 |
value="1" |
| 2105 |
<?php checked( 1, $settings['cache_footprint'] ); ?> |
| 2106 |
> |
| 2107 |
<span class="sui-toggle-slider" aria-hidden="true"></span> |
| 2108 |
<span id="enable_cache_footprint_label" class="sui-toggle-label"><?php esc_html_e( 'Show caching footprints in the HTML output.', 'powered-cache' ); ?></span> |
| 2109 |
<span id="enable_cache_footprint_description" class="sui-description"><?php esc_html_e( 'Adds helpful informations to cached output.', 'powered-cache' ); ?></span> |
| 2110 |
</label> |
| 2111 |
</div> |
| 2112 |
</div> |
| 2113 |
</div> |
| 2114 |
<?php if ( can_control_all_settings() ) : ?> |
| 2115 |
<div class="sui-box-settings-row"> |
| 2116 |
<div class="sui-box-settings-col-1"> |
| 2117 |
<span class="sui-settings-label"><?php esc_html_e( 'Download Configuration', 'powered-cache' ); ?></span> |
| 2118 |
<span class="sui-description"></span> |
| 2119 |
</div> |
| 2120 |
|
| 2121 |
<div class="sui-box-settings-col-2"> |
| 2122 |
<div class="sui-form-field"> |
| 2123 |
<a href="<?php echo esc_url_raw( wp_nonce_url( admin_url( 'admin-post.php?action=powered_cache_download_rewrite_settings&server=apache' ), 'powered_cache_download_rewrite' ) ); ?>" value="download_htaccess_configuration" class="sui-button sui-button-ghost sui-button-blue"><?php esc_html_e( '.htaccess configuration', 'powered-cache' ); ?></a> |
| 2124 |
<a href="<?php echo esc_url_raw( wp_nonce_url( admin_url( 'admin-post.php?action=powered_cache_download_rewrite_settings&server=nginx' ), 'powered_cache_download_rewrite' ) ); ?>" value="download_nginx_configuration" class="sui-button sui-button-ghost sui-button-blue"><?php esc_html_e( 'nginx configuration', 'powered-cache' ); ?></a> |
| 2125 |
</div> |
| 2126 |
</div> |
| 2127 |
</div> |
| 2128 |
<?php endif; ?> |
| 2129 |
|
| 2130 |
<div class="sui-box-settings-row"> |
| 2131 |
<div class="sui-box-settings-col-1"> |
| 2132 |
<span class="sui-settings-label"><?php esc_html_e( 'Reset All Settings', 'powered-cache' ); ?></span> |
| 2133 |
<span class="sui-description"><?php esc_html_e( 'Fabric reset to plugin configuration', 'powered-cache' ); ?></span> |
| 2134 |
</div> |
| 2135 |
|
| 2136 |
<div class="sui-box-settings-col-2"> |
| 2137 |
<div class="sui-form-field"> |
| 2138 |
<button role="submit" name="powered_cache_form_action" value="reset_settings" class="sui-button sui-button-ghost sui-button-blue"> |
| 2139 |
<?php esc_html_e( 'Reset Settings', 'powered-cache' ); ?> |
| 2140 |
</button> |
| 2141 |
|
| 2142 |
</div> |
| 2143 |
</div> |
| 2144 |
</div> |
| 2145 |
<?php if ( can_control_all_settings() ) : ?> |
| 2146 |
<div class="sui-box-settings-row"> |
| 2147 |
<div class="sui-box-settings-col-1"> |
| 2148 |
<span class="sui-settings-label"><?php esc_html_e( 'Diagnostic', 'powered-cache' ); ?></span> |
| 2149 |
<span class="sui-description"><?php esc_html_e( 'Configuration checker for caching', 'powered-cache' ); ?></span> |
| 2150 |
</div> |
| 2151 |
|
| 2152 |
<div class="sui-box-settings-col-2"> |
| 2153 |
<div class="sui-form-field"> |
| 2154 |
<button role="button" value="run_diognastic" data-modal-open="pcmodal--powered-cache-diagnostic" class="sui-button sui-button-ghost sui-button-blue" data-esc-close="true" data-modal-mask="true"><?php esc_html_e( 'Run Diagnostic', 'powered-cache' ); ?></button> |
| 2155 |
</div> |
| 2156 |
</div> |
| 2157 |
</div> |
| 2158 |
<?php endif; ?> |
| 2159 |
|
| 2160 |
|
| 2161 |
<div class="sui-box-settings-row"> |
| 2162 |
<div class="sui-box-settings-col-1"> |
| 2163 |
<span class="sui-settings-label"><?php esc_html_e( 'Export', 'powered-cache' ); ?></span> |
| 2164 |
<span class="sui-description"></span> |
| 2165 |
</div> |
| 2166 |
|
| 2167 |
<div class="sui-box-settings-col-2"> |
| 2168 |
<div class="sui-form-field"> |
| 2169 |
<button type="submit" role="button" name="powered_cache_form_action" value="export_settings" class="sui-button sui-button-ghost sui-button-blue"><?php esc_html_e( 'Download Settings', 'powered-cache' ); ?></button> |
| 2170 |
</div> |
| 2171 |
</div> |
| 2172 |
</div> |
| 2173 |
|
| 2174 |
<div class="sui-box-settings-row"> |
| 2175 |
<div class="sui-box-settings-col-1"> |
| 2176 |
<span class="sui-settings-label"><?php esc_html_e( 'Import', 'powered-cache' ); ?></span> |
| 2177 |
<span class="sui-description"></span> |
| 2178 |
</div> |
| 2179 |
|
| 2180 |
<div class="sui-box-settings-col-2"> |
| 2181 |
<div class="sui-form-field"> |
| 2182 |
<div class="sui-upload" id="powered-cache-import-upload-wrap"> |
| 2183 |
<input id="powered-cache-import-file-input" class="powered-cache-file-input" name="import_file" type="file" value="" readonly="readonly" accept=".json"> |
| 2184 |
<label class="sui-upload-button" type="button" for="powered-cache-import-file-input"> |
| 2185 |
<span class="sui-icon-upload-cloud" aria-hidden="true"></span> |
| 2186 |
<?php esc_html_e( 'Upload file', 'powered-cache' ); ?> |
| 2187 |
</label> |
| 2188 |
<div class="sui-upload-file"> |
| 2189 |
<span id="powered-cache-import-file-name"></span> |
| 2190 |
<button type="button" id="powered-cache-import-remove-file" aria-label="Remove file"> |
| 2191 |
<span class="sui-icon-close" aria-hidden="true"></span> |
| 2192 |
</button> |
| 2193 |
</div> |
| 2194 |
|
| 2195 |
<button role="button" id="powered-cache-import-btn" name="powered_cache_form_action" value="import_settings" style="margin-left: 10px;" class="sui-button sui-button-ghost sui-button-blue" disabled> |
| 2196 |
<?php esc_html_e( 'Upload and Import', 'powered-cache' ); ?> |
| 2197 |
</button> |
| 2198 |
|
| 2199 |
</div> |
| 2200 |
<span class="sui-description" style="margin-top: 10px;"><?php esc_html_e( 'Choose a JSON(.json) file to import the configuration.', 'powered-cache' ); ?></span> |
| 2201 |
</div> |
| 2202 |
|
| 2203 |
</div> |
| 2204 |
|
| 2205 |
</div> |
| 2206 |
</div> |
| 2207 |
|
| 2208 |
</div> |
| 2209 |
|
| 2210 |
<?php do_action( 'powered_cache_admin_page_after_settings_section' ); ?> |
| 2211 |
|
| 2212 |
</section> |
| 2213 |
</form> |
| 2214 |
|
| 2215 |
<!-- ELEMENT: The Brand --> |
| 2216 |
<div class="sui-footer"> |
| 2217 |
<?php |
| 2218 |
echo wp_kses_post( |
| 2219 |
sprintf( |
| 2220 |
__( 'Made with <i class="sui-icon-heart"></i> by <a href="%s" rel="noopener" target="_blank">PoweredCache</a>', 'powered-cache' ), |
| 2221 |
'https://poweredcache.com/' |
| 2222 |
) |
| 2223 |
); |
| 2224 |
?> |
| 2225 |
</div> |
| 2226 |
|
| 2227 |
<footer> |
| 2228 |
<!-- ELEMENT: Navigation --> |
| 2229 |
<ul class="sui-footer-nav"> |
| 2230 |
<li><a href="https://poweredcache.com/faq/" target="_blank"><?php esc_html_e( 'FAQ', 'powered-cache' ); ?></a></li> |
| 2231 |
<li><a href="https://poweredcache.com/blog/" target="_blank"><?php esc_html_e( 'Blog', 'powered-cache' ); ?></a></li> |
| 2232 |
<li><a href="https://poweredcache.com/changelog/" target="_blank"><?php esc_html_e( 'Changelog', 'powered-cache' ); ?></a></li> |
| 2233 |
<li><a href="https://poweredcache.com/support/" target="_blank"><?php esc_html_e( 'Support', 'powered-cache' ); ?></a></li> |
| 2234 |
</ul> |
| 2235 |
|
| 2236 |
<!-- ELEMENT: Social Media --> |
| 2237 |
<ul class="sui-footer-social"> |
| 2238 |
<li><a href="https://www.facebook.com/poweredcache" target="_blank"> |
| 2239 |
<i class="sui-icon-social-facebook" aria-hidden="true"></i> |
| 2240 |
<span class="sui-screen-reader-text"><?php esc_html_e( 'Facebook', 'powered-cache' ); ?></span> |
| 2241 |
</a></li> |
| 2242 |
<li><a href="https://twitter.com/poweredcache" target="_blank"> |
| 2243 |
<i class="sui-icon-social-twitter" aria-hidden="true"></i></a> |
| 2244 |
<span class="sui-screen-reader-text"><?php esc_html_e( 'Twitter', 'powered-cache' ); ?></span> |
| 2245 |
</li> |
| 2246 |
</ul> |
| 2247 |
</footer> |
| 2248 |
|
| 2249 |
<?php require 'modals.php'; ?> |
| 2250 |
</main> |
| 2251 |
|