PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | templates/cache/page-cache.php +22 -19 3.7.0 → 4.7.0 View file →
@@ -1,6 +1,6 @@
1 -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?>
2 -<?php if ($does_server_handles_cache) : ?>
1 +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
2 +<?php if ($does_server_handle_cache) : ?>
3 3 <div class="wpo-info highlight-dashicons">
4 4 <h3><?php esc_html_e('Your web hosting company/server handles:', 'wp-optimize'); ?></h3>
5 5 <p><?php esc_html_e('Page caching', 'wp-optimize'); ?><span class="dashicons dashicons-saved"></span></p>
6 6 <p><?php esc_html_e('Gzip compression', 'wp-optimize'); ?><span class="dashicons dashicons-saved"></span></p>
@@ -9,18 +9,18 @@
9 9 <?php else : ?>
10 10 <div class="wpo-info">
11 11 <a class="wpo-info__trigger" href="#"><span class="dashicons dashicons-sos"></span> <?php esc_html_e('How to use the cache feature', 'wp-optimize'); ?> <span class="wpo-info__close"><?php esc_html_e('Close', 'wp-optimize'); ?></span></a>
12 12 <div class="wpo-info__content">
13 - <p><strong><?php esc_html_e('Not sure how to use the cache feature?', 'wp-optimize'); ?></strong> <br><?php esc_html_e('Watch our how-to video below.', 'wp-optimize'); ?></p>
13 + <p><strong><?php esc_html_e('Not sure how to use the cache feature?', 'wp-optimize'); ?></strong> <br><?php esc_html_e('Watch our how to video below.', 'wp-optimize'); ?></p>
14 14 <div class="wpo-video-preview">
15 - <a href="https://vimeo.com/337247770" data-embed="https://player.vimeo.com/video/337247770?color=df6926&title=0&byline=0&portrait=0" target="_blank"><img src="<?php echo esc_url(trailingslashit(WPO_PLUGIN_URL) . 'images/notices/cache-video-preview.png'); ?>" alt="<?php esc_attr_e('Cache video preview', 'wp-optimize');?>" /></a>
15 + <a href="https://vimeo.com/1014288082" data-embed="https://player.vimeo.com/video/1014288082?color=df6926&title=0&byline=0&portrait=0" target="_blank"><img src="<?php echo esc_url(trailingslashit(WPO_PLUGIN_URL) . 'images/notices/video-thumb.jpg'); ?>" alt="<?php esc_attr_e('Cache video preview', 'wp-optimize');?>" /></a>
16 16 </div>
17 - <small>(<?php esc_html_e('Loads a video hosted on vimeo.com', 'wp-optimize'); ?>) - <?php $wp_optimize->wp_optimize_url('https://vimeo.com/337247770', __('Open the video in a new window', 'wp-optimize')); ?></small>
17 + <small>(<?php esc_html_e('Loads a video hosted on vimeo.com', 'wp-optimize'); ?>) - <?php $wp_optimize->wp_optimize_url('https://vimeo.com/1014288082', __('Open the video in a new window', 'wp-optimize')); ?></small>
18 18 </div>
19 19 </div>
20 20 <div class="wpo-fieldgroup wpo-first-child cache-options">
21 21 <div class="notice notice-warning below-h2 wpo-warnings__enabling-cache wpo_hidden"><p></p><ul></ul></div>
22 - <div class="notice error below-h2 wpo-error wpo-error__enabling-cache <?php echo empty($error) ? 'wpo_hidden' : ''; ?>"><p><?php echo htmlentities($error); ?></p></div>
22 + <div class="notice error below-h2 wpo-error wpo-error__enabling-cache <?php echo empty($error) ? 'wpo_hidden' : ''; ?>"><p><?php echo esc_html($error); ?></p></div>
23 23
24 24 <pre id="wpo_advanced_cache_output" style="display: none;"></pre>
25 25
26 26 <div class="switch-container">
@@ -38,8 +38,9 @@
38 38
39 39 <?php if (!empty($active_cache_plugins)) { ?>
40 40 <p class="wpo-error">
41 41 <?php
42 + // translators: %s - list of active caching plugins
42 43 $message = sprintf(__('It looks like you already have an active caching plugin (%s) installed.', 'wp-optimize'), implode(', ', $active_cache_plugins));
43 44 $message .= ' ';
44 45 $message .= __('Having more than one active page cache might cause unexpected results.', 'wp-optimize');
45 46 echo esc_html($message);
@@ -50,13 +51,13 @@
50 51 </div>
51 52
52 53 <h3 class="purge-cache" style="<?php echo esc_attr($display); ?>"> <?php esc_html_e('Purge the cache', 'wp-optimize'); ?></h3>
53 54 <div class="wpo-fieldgroup cache-options purge-cache" style="<?php echo esc_attr($display); ?>" >
54 - <p class="wpo-button-wrap">
55 + <div class="wpo-save-btn-container wpo-button-wrap">
55 56 <input id="wp-optimize-purge-cache" class="button button-primary <?php echo $can_purge_the_cache ? '' : 'disabled'; ?>" type="submit" value="<?php esc_attr_e('Purge cache', 'wp-optimize'); ?>" <?php echo $can_purge_the_cache ? '' : 'disabled'; ?>>
56 - <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); ?>" alt="...">
57 + <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="...">
57 58 <span class="save-done dashicons dashicons-yes display-none"></span>
58 - </p>
59 + </div>
59 60 <p>
60 61 <?php esc_html_e('Deletes the entire cache contents but keeps the page cache enabled.', 'wp-optimize'); ?>
61 62 </p>
62 63 <p>
@@ -62,17 +63,17 @@
62 63 <p>
63 64 <span id="wpo_current_cache_size_information"><?php esc_html_e('Current cache size:', 'wp-optimize'); ?> <?php echo esc_html(WP_Optimize()->format_size($cache_size['size'])); ?></span>
64 65 <br><span id="wpo_current_cache_file_count"><?php esc_html_e('Number of files:', 'wp-optimize'); ?> <?php echo esc_html($cache_size['file_count']); ?></span>
65 66 </p>
66 - <div class="wpo-fieldgroup__subgroup" style="padding-bottom: 15px;">
67 - <div style="float: left;">
67 + <div class="wpo-fieldgroup__subgroup" style="display: flex;">
68 + <div class="wpo-fieldgroup__subgroup">
68 69 <label for="wpo-auto-preload-after-purge">
69 70 <input type="checkbox" id="wpo-auto-preload-after-purge" class="cache-settings" name="auto_preload_purged_contents" <?php checked($auto_preload_purged_contents); ?>>
70 71 <?php esc_html_e('Automatically preload content after it is purged', 'wp-optimize'); ?>
71 72 </label>
72 - <span tabindex="0" data-tooltip="<?php echo esc_attr__('Automatically preload pages when a post or page is purged or updated.', 'wp-optimize') . ' ' . esc_attr__('Note that enabling this feature may extend the time it takes to save a post due to background preloading.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
73 + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php echo esc_attr__('Automatically preload pages when a post or page is purged or updated.', 'wp-optimize') . ' ' . esc_attr__('Note that enabling this feature may extend the time it takes to save a post due to background preloading.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
73 74 </div>
74 - <span class="dashicons dashicons-yes display-none save-done" style="line-height: 20px; float: left;"></span>
75 + <span class="dashicons dashicons-yes display-none save-done" style="line-height: 20px;"></span>
75 76 </div>
76 77
77 78 </div>
78 79
@@ -84,9 +85,9 @@
84 85 <label for="enable_mobile_caching">
85 86 <input name="enable_mobile_caching" id="enable_mobile_caching" class="cache-settings" type="checkbox" value="true" <?php checked($wpo_cache_options['enable_mobile_caching'], 1); ?>>
86 87 <?php esc_html_e('Generate separate files for mobile devices', 'wp-optimize'); ?>
87 88 </label>
88 - <span tabindex="0" data-tooltip="<?php esc_attr_e('Useful if your website has mobile-specific content.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
89 + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Useful if your website has mobile-specific content.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
89 90 </div>
90 91
91 92 <div class="wpo-fieldgroup__subgroup">
92 93 <label for="enable_user_caching">
@@ -92,9 +93,9 @@
92 93 <label for="enable_user_caching">
93 94 <input name="enable_user_caching" id="enable_user_caching" class="cache-settings wpo-select-group" type="checkbox" value="true" <?php checked($wpo_cache_options['enable_user_caching']); ?>>
94 95 <?php esc_html_e('Serve cached pages to logged in users', 'wp-optimize'); ?>
95 96 </label>
96 - <span tabindex="0" data-tooltip="<?php esc_attr_e('Enable this option if you do not have user-specific or restricted content on your website (this works only when the cache is preloaded).', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
97 + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Enable this option if you do not have user-specific or restricted content on your website (this works only when the cache is preloaded).', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
97 98 </div>
98 99
99 100 <?php do_action('wpo_after_cache_settings'); ?>
100 101
@@ -101,9 +102,9 @@
101 102 <div class="wpo-fieldgroup__subgroup">
102 103 <label for="page_cache_length_value"><?php esc_html_e('Cache lifespan', 'wp-optimize'); ?></label>
103 104 <p>
104 105 <input name="page_cache_length_value" id="page_cache_length_value" class="cache-settings" type="number" value="<?php echo esc_attr($wpo_cache_options['page_cache_length_value']); ?>">
105 - <select name="page_cache_length_unit" id="page_cache_length_unit" class="cache-settings">
106 + <select name="page_cache_length_unit" id="page_cache_length_unit" class="cache-settings wpo-select2">
106 107 <option value="hours" <?php selected('hours', $wpo_cache_options['page_cache_length_unit']); ?>><?php esc_html_e('Hours', 'wp-optimize'); ?></option>
107 108 <option value="days" <?php selected('days', $wpo_cache_options['page_cache_length_unit']); ?>><?php esc_html_e('Days', 'wp-optimize'); ?></option>
108 109 <option value="months" <?php selected('months', $wpo_cache_options['page_cache_length_unit']); ?>><?php esc_html_e('Months', 'wp-optimize'); ?></option>
109 110 </select>
@@ -116,10 +117,12 @@
116 117 <?php do_action('wpo_page_cache_settings_after', $wpo_cache_options); ?>
117 118
118 119 </div>
119 120
120 -<input id="wp-optimize-save-cache-settings" class="button button-primary" type="submit" name="wp-optimize-save-cache-settings" value="<?php esc_attr_e('Save changes', 'wp-optimize'); ?>">
121 +<div class="wpo-save-btn-container">
122 + <input id="wp-optimize-save-cache-settings" class="button button-primary" type="submit" name="wp-optimize-save-cache-settings" value="<?php esc_attr_e('Save changes', 'wp-optimize'); ?>">
121 123
122 -<img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); ?>" alt="....">
124 + <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="....">
123 125
124 -<span class="save-done dashicons dashicons-yes display-none"></span>
126 + <span class="save-done dashicons dashicons-yes display-none"></span>
127 +</div>
125 128 <?php endif;