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
wp-optimize / templates / cache / page-cache-advanced.php

page-cache-advanced.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at templates/cache/page-cache-advanced.php

158 lines 8.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
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
59 <h3 class="wpo-first-child"><?php esc_html_e('URLs to exclude from caching', 'wp-optimize'); ?></h3>
60
61 <div class="wpo-fieldgroup">
62
63 <p>
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>
70 <textarea name="cache_exception_urls" id="cache_exception_urls" class="cache-settings" placeholder="/members/*"><?php echo esc_html($cache_exception_urls); ?></textarea>
71 </p>
72
73 <span>
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 ?>
80 </span>
81
82 <?php do_action('wpo_after_cache_exception_urls'); ?>
83
84 </div>
85
86 <?php do_action('wpo_after_cache_exception_urls_fieldgroup'); ?>
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
106 <h3 class="wpo-first-child"><?php esc_html_e('Cookies which, if present, will prevent caching (one per line)', 'wp-optimize'); ?></h3>
107
108 <div class="wpo-fieldgroup">
109
110 <p>
111 <label for="cache_exception_cookies"><?php esc_html_e('List of cookies that will prevent caching when set.', 'wp-optimize'); ?></label>
112 <textarea name="cache_exception_cookies" id="cache_exception_cookies" class="cache-settings" placeholder="wordpress_*"><?php echo esc_textarea($cache_exception_cookies); ?></textarea>
113 </p>
114 </div>
115
116 <h3 class="wpo-first-child"><?php esc_html_e('Conditional tags to exclude from caching', 'wp-optimize'); ?></h3>
117
118 <div class="wpo-fieldgroup">
119
120 <p>
121 <label for="cache_exception_conditional_tags">
122 <?php
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>'));
125 echo '&nbsp;';
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>'));
128 ?>
129 </label>
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>
131 </p>
132
133 <?php do_action('wpo_after_cache_conditional_tags'); ?>
134
135 </div>
136
137 <h3 class="wpo-first-child"><?php esc_html_e('List of browser agent strings which, if detected, will prevent caching', 'wp-optimize'); ?></h3>
138
139 <div class="wpo-fieldgroup">
140
141 <p>
142 <label for="cache_exception_browser_agents"><?php esc_html_e('List of browser agents strings or substrings that should not be served cached files (one per line)', 'wp-optimize'); ?></label>
143 <textarea name="cache_exception_browser_agents" id="cache_exception_browser_agents" class="cache-settings" placeholder="AppleWebKit/*"><?php echo esc_textarea($cache_exception_browser_agents); ?></textarea>
144 </p>
145
146 <span><?php esc_html_e('If any of the above strings is found in the User-Agent HTTP header, then the requested page will not be cached.', 'wp-optimize'); ?> </span>
147 </div>
148
149 <?php do_action('wpo_page_cache_advanced_settings', $wpo_cache_options); ?>
150
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">
153
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="...">
155
156 <span class="save-done dashicons dashicons-yes display-none"></span>
157 </div>
158