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-advanced.php +96 -8 3.2.22 → 4.7.0 View file →
@@ -1,17 +1,83 @@
1 -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?>
1 +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
2 2
3 +<h3 class="wpo-first-child"><?php esc_html_e('Cache Gravatars', 'wp-optimize'); ?></h3>
4 +
5 +<div class="wpo-fieldgroup cache-options">
6 + <div class="wpo-fieldgroup__subgroup">
7 + <label for="wpo-show-avatars">
8 + <input type="checkbox" value="true" disabled <?php checked($show_avatars, 1); ?>>
9 + <?php esc_html_e('Show avatars (WordPress core setting).', 'wp-optimize'); ?>
10 + </label>
11 + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('This option controls the WordPress core avatar display setting.', 'wp-optimize'); ?> <?php esc_attr_e('WP-Optimize does not manage avatars directly.', 'wp-optimize'); ?> <?php esc_attr_e('You can also change this setting in Settings → Discussion.', 'wp-optimize'); ?> <?php esc_attr_e('When disabled, locally hosted gravatars will also be disabled.', 'wp-optimize'); ?>">
12 + <span class="dashicons dashicons-editor-help"></span>
13 + </span>
14 + <p class="description">
15 + <?php esc_html_e('This is a WordPress core setting.', 'wp-optimize'); ?>
16 + <?php
17 + /* translators: %s: Link to WordPress Discussion Settings page */
18 + printf(esc_html__('For more avatar options, visit %s.', 'wp-optimize'), '<a href="' . esc_url(admin_url('options-discussion.php')) . '" target="_blank">' . esc_html__('Settings → Discussion', 'wp-optimize') . '</a>');
19 + ?>
20 + </p>
21 + </div>
22 + <div class="wpo-fieldgroup__subgroup" id="wpo-host-gravatars-locally-container">
23 + <label for="wpo-host-gravatars-locally">
24 + <input type="checkbox" value="true" disabled>
25 + <?php esc_html_e('Host gravatars locally.', 'wp-optimize'); ?>
26 + </label>
27 + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Host gravatars locally to reduce http requests and enhanced privacy.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
28 + </div>
29 + <p><a href="<?php echo esc_url(WP_Optimize()->premium_version_link); ?>&utm_content=host-gravatars-locally" target="_blank"><?php esc_html_e('Upgrade to WP-Optimize Premium to unlock this feature.', 'wp-optimize'); ?></a></p>
30 +</div>
31 +
32 +<h3 class="wpo-first-child"><?php esc_html_e('URLs to include in caching', 'wp-optimize'); ?></h3>
33 +
34 +<div class="wpo-fieldgroup">
35 + <div class="wpo-fieldgroup__subgroup">
36 + <label for="cache_specific_urls_only">
37 + <input name="cache_specific_urls_only" id="cache_specific_urls_only" class="cache-settings" type="checkbox" value="true" disabled>
38 + <?php esc_html_e('Cache Specific URLs Only', 'wp-optimize'); ?>
39 + </label>
40 + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Enable or disable caching for specific URLs only.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span> </span>
41 + </div>
42 + <p><a href="<?php echo esc_url(WP_Optimize()->premium_version_link); ?>&utm_content=cache_ignore_query_variables" target="_blank"><?php esc_html_e('Upgrade to WP-Optimize Premium to unlock this feature.', 'wp-optimize'); ?></a></p>
43 + <p>
44 + <?php // Translators: %s is an example path. ?>
45 + <label for="cache_include_urls"><?php echo wp_kses_post(sprintf(__('List paths (e.g. %s) that should be cached (one per line)', 'wp-optimize'), '<code>'.esc_html_x('/sample-page', 'an example path', 'wp-optimize').'</code>')); ?> </label>
46 + <textarea name="cache_include_urls" id="cache_include_urls" class="cache-settings" placeholder="/members/*" disabled></textarea>
47 + </p>
48 +
49 + <span>
50 + <?php
51 + esc_html_e('Use the wildcard * to include child URLs.', 'wp-optimize');
52 + echo ' ';
53 + // Translators: %s are examples of path using the wildcard *
54 + echo wp_kses_post(sprintf(_x('e.g. %1$s or %2$s', '%s are examples of path using the wildcard *', 'wp-optimize'), '<code>'.esc_html_x('/shop/*', 'an example path with the wildcard (*)', 'wp-optimize').'</code>', '<code>'.esc_html_x('*sample-path*', 'a second example path using the wildcard (*) twice', 'wp-optimize').'</code>'));
55 + ?>
56 + </span>
57 +</div>
58 +
3 59 <h3 class="wpo-first-child"><?php esc_html_e('URLs to exclude from caching', 'wp-optimize'); ?></h3>
4 60
5 61 <div class="wpo-fieldgroup">
6 62
7 63 <p>
8 - <label for="cache_exception_urls"><?php echo strip_tags(sprintf(__('List paths (e.g. %s) that should not be cached (one per line)', 'wp-optimize'), '<code>'.esc_html_x('/product/green-beans', 'an example path', 'wp-optimize').'</code>'), '<code>'); ?> </label>
64 + <label for="cache_exception_urls">
65 + <?php
66 + // translators: %s is an example path
67 + echo wp_kses_post(sprintf(__('List paths (e.g. %s) that should not be cached (one per line)', 'wp-optimize'), '<code>'.esc_html_x('/product/green-beans', 'an example path', 'wp-optimize').'</code>'));
68 + ?>
69 + </label>
9 70 <textarea name="cache_exception_urls" id="cache_exception_urls" class="cache-settings" placeholder="/members/*"><?php echo esc_html($cache_exception_urls); ?></textarea>
10 71 </p>
11 72
12 73 <span>
13 - <?php esc_html_e('Use the wildcard * to exclude child URLs.', 'wp-optimize'); ?> <?php echo strip_tags(sprintf(_x('e.g. %s or %s', '%s are examples of path using the wildcard *', 'wp-optimize'), '<code>'.esc_html_x('/shop/*', 'an example path with the wildcard (*)', 'wp-optimize').'</code>', '<code>'.esc_html_x('*sample-path*', 'a second example path using the wildcard (*) twice', 'wp-optimize').'</code>'), '<code>'); ?>
74 + <?php
75 + esc_html_e('Use the wildcard * to exclude child URLs.', 'wp-optimize');
76 + echo ' ';
77 + // translators: %1$s and %2$s are examples of path using the wildcard *
78 + echo wp_kses_post(sprintf(_x('e.g. %1$s or %2$s', '%s are examples of path using the wildcard *', 'wp-optimize'), '<code>'.esc_html_x('/shop/*', 'an example path with the wildcard (*)', 'wp-optimize').'</code>', '<code>'.esc_html_x('*sample-path*', 'a second example path using the wildcard (*) twice', 'wp-optimize').'</code>'));
79 + ?>
14 80 </span>
15 81
16 82 <?php do_action('wpo_after_cache_exception_urls'); ?>
17 83
@@ -18,8 +84,26 @@
18 84 </div>
19 85
20 86 <?php do_action('wpo_after_cache_exception_urls_fieldgroup'); ?>
21 87
88 +<h3 class="wpo-first-child"><?php esc_html_e('Ignore these query variables when caching', 'wp-optimize'); ?></h3>
89 +
90 +<div class="wpo-fieldgroup">
91 +
92 + <p>
93 + <label for="cache_ignore_query_variables">
94 + <?php esc_html_e('List query variables that should be ignored while caching (one per line)', 'wp-optimize'); ?>
95 + </label>
96 + <textarea name="cache_ignore_query_variables" id="cache_ignore_query_variables" class="cache-settings" placeholder="wpo_cache_debug" disabled><?php echo esc_textarea($cache_ignore_query_variables); ?></textarea>
97 + </p>
98 + <p><a href="<?php echo esc_url(WP_Optimize()->premium_version_link); ?>&utm_content=cache_ignore_query_variables" target="_blank"><?php esc_html_e('Upgrade to WP-Optimize Premium to unlock this feature.', 'wp-optimize'); ?></a></p>
99 +
100 + <?php do_action('wpo_after_cache_ignore_query_variables'); ?>
101 +
102 +</div>
103 +
104 +<?php do_action('wpo_after_cache_ignore_query_variables_fieldgroup'); ?>
105 +
22 106 <h3 class="wpo-first-child"><?php esc_html_e('Cookies which, if present, will prevent caching (one per line)', 'wp-optimize'); ?></h3>
23 107
24 108 <div class="wpo-fieldgroup">
25 109
@@ -35,11 +119,13 @@
35 119
36 120 <p>
37 121 <label for="cache_exception_conditional_tags">
38 122 <?php
39 - echo strip_tags(sprintf(__('List conditional tags (e.g. %s) that should not be cached (one per line).', 'wp-optimize'), '<code>is_single</code>'), '<code>');
123 + // translators: %s is an example conditional tag
124 + echo wp_kses_post(sprintf(__('List conditional tags (e.g. %s) that should not be cached (one per line).', 'wp-optimize'), '<code>is_single</code>'));
40 125 echo '&nbsp;';
41 - echo strip_tags(sprintf(__('You can find more details about conditional tags from %1$shere%2$s', 'wp-optimize'), '<a href="https://codex.wordpress.org/Conditional_Tags" target="_blank">', '</a>'), '<a>');
126 + // translators: %1$s and %2$s are anchor tags
127 + echo wp_kses_post(sprintf(__('You can find more details about conditional tags from %1$shere%2$s', 'wp-optimize'), '<a href="https://codex.wordpress.org/Conditional_Tags" target="_blank">', '</a>'));
42 128 ?>
43 129 </label>
44 130 <textarea name="cache_exception_conditional_tags" id="cache_exception_conditional_tags" class="cache-settings" placeholder="is_single"><?php echo esc_textarea($cache_exception_conditional_tags); ?></textarea>
45 131 </p>
@@ -61,9 +147,11 @@
61 147 </div>
62 148
63 149 <?php do_action('wpo_page_cache_advanced_settings', $wpo_cache_options); ?>
64 150
65 -<input id="wp-optimize-save-cache-advanced-rules" class="button button-primary" type="submit" name="wp-optimize-save-cache-advanced-rules" value="Save changes">
151 +<div class="wpo-save-btn-container">
152 + <input id="wp-optimize-save-cache-advanced-rules" class="button button-primary" type="submit" name="wp-optimize-save-cache-advanced-rules" value="Save changes">
66 153
67 -<img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); ?>" alt="...">
154 + <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="...">
68 155
69 -<span class="save-done dashicons dashicons-yes display-none"></span>
156 + <span class="save-done dashicons dashicons-yes display-none"></span>
157 +</div>