PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.5.3
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.5.3
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 / minify / font-settings-tab.php

font-settings-tab.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.5.3, at templates/minify/font-settings-tab.php

206 lines 9.3 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 <div class="wpo_section wpo_group">
3 <form>
4 <div id="wpo_settings_warnings"></div>
5 <h3><?php esc_html_e('Google Fonts', 'wp-optimize'); ?></h3>
6 <div class="wpo-fieldgroup">
7 <fieldset>
8 <div class="wpo-fieldgroup__subgroup show-if-enabled">
9 <label for="disable_google_fonts_processing">
10 <input
11 name="disable_google_fonts_processing"
12 type="checkbox"
13 id="disable_google_fonts_processing"
14 value="1"
15 <?php checked($wpo_minify_options['disable_google_fonts_processing']); ?>
16 >
17 <?php esc_html_e('Disable Google Fonts processing', 'wp-optimize'); ?>
18 </label>
19 <span tabindex="0" data-tooltip="<?php esc_attr_e('If enabled, stylesheets from Google Fonts will bypass WP-Optimize processing, allowing standard WordPress processing to be used instead.', 'wp-optimize');?> <?php esc_attr_e('This can be helpful if you are using other plugins that work with Google Fonts and experience conflicts with WP-Optimize.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
20 </div>
21 <?php if (WP_OPTIMIZE_SHOW_MINIFY_ADVANCED) : ?>
22 <div class="wpo-fieldgroup__subgroup show-if-enabled">
23 <label for="merge_google_fonts">
24 <input
25 name="merge_google_fonts"
26 type="checkbox"
27 id="merge_google_fonts"
28 class="google_fonts_option"
29 value="1"
30 <?php checked($wpo_minify_options['merge_google_fonts']); ?>
31 >
32 <?php esc_html_e('Merge fonts from Google Fonts into one request', 'wp-optimize'); ?>
33 </label>
34 <span tabindex="0" data-tooltip="<?php esc_attr_e('This improves speed when loading multiple fonts from Google Fonts.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
35 </div>
36 <?php endif; ?>
37 <div class="wpo-fieldgroup__subgroup show-if-enabled">
38 <label for="remove_googlefonts">
39 <input
40 name="remove_googlefonts"
41 type="checkbox"
42 id="remove_googlefonts"
43 class="google_fonts_option"
44 value="1"
45 <?php checked($wpo_minify_options['remove_googlefonts']); ?>
46 >
47 <?php esc_html_e('Do not load Google Fonts', 'wp-optimize'); ?>
48 </label>
49 <span tabindex="0" data-tooltip="<?php esc_attr_e('If enabled, stylesheets from Google Fonts will not be loaded on the site and system fallback fonts will be used instead.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
50 </div>
51 <div class="wpo-fieldgroup__subgroup show-if-enabled">
52 <label for="enable_display_swap">
53 <input
54 name="enable_display_swap"
55 type="checkbox"
56 id="enable_display_swap"
57 class="google_fonts_option"
58 value="1"
59 <?php checked($wpo_minify_options['enable_display_swap']); ?>
60 >
61 <?php esc_html_e('Add "display=swap" to Google Fonts requests', 'wp-optimize'); ?>
62 </label>
63 <span tabindex="0" data-tooltip="<?php esc_attr_e('This feature of Google Fonts is encouraged for better accessibility, but may result in a visible font change.', 'wp-optimize'); ?>"><span class="dashicons dashicons-editor-help"></span></span><br>
64 </div>
65 <div class="wpo-fieldgroup__subgroup">
66 <label for="host_local_google_fonts">
67 <input
68 name="host_local_google_fonts"
69 type="checkbox"
70 id="host_local_google_fonts"
71 class="google_fonts_option skip-disable-processing"
72 value="1"
73 disabled
74 >
75 <?php esc_html_e('Host Google Fonts locally', 'wp-optimize'); ?>
76 </label>
77 <span tabindex="0" data-tooltip="<?php esc_attr_e('If enabled, stylesheet and font files from Google Fonts will be hosted locally.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span>
78 <div id="wpo_fonts_cache_size_information">
79 <a class="" href="https://teamupdraft.com/wp-optimize/pricing/?utm_source=wpo-plugin&utm_medium=referral&utm_campaign=paac&utm_creative_format=overlay&utm_content=host-local-google-fonts" target="_blank"><?php esc_html_e('Upgrade to WP-Optimize Premium to unlock Host Google Fonts feature.', 'wp-optimize'); ?></a>
80 </div>
81 </div>
82 </fieldset>
83 <p class="wpo_min-bold-green wpo_min-rowintro show-if-enabled">
84 <?php esc_html_e('Choose how to include fonts from Google Fonts on your pages, when available:', 'wp-optimize'); ?>
85 </p>
86 <fieldset class="show-if-enabled">
87 <div class="wpo-fieldgroup__subgroup">
88 <label>
89 <input
90 type="radio"
91 class="google_fonts_option"
92 name="gfonts_method"
93 value="inherit"
94 <?php checked('inherit' === $wpo_minify_options['gfonts_method']); ?>
95 >
96 <?php esc_html_e('Inherit from the CSS settings', 'wp-optimize'); ?>
97 </label>
98 <span tabindex="0" data-tooltip="<?php esc_attr_e('The stylesheets will be merged or inlined.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
99 </div>
100 <div class="wpo-fieldgroup__subgroup">
101 <label>
102 <input
103 type="radio"
104 class="google_fonts_option"
105 name="gfonts_method"
106 value="inline"
107 <?php checked('inline' === $wpo_minify_options['gfonts_method']); ?>
108 >
109 <?php esc_html_e('Inline google font CSS files', 'wp-optimize'); ?>
110 </label>
111 <span tabindex="0" data-tooltip="<?php esc_attr_e('The stylesheets will be inlined.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
112 </div>
113 <div class="wpo-fieldgroup__subgroup">
114 <label>
115 <input
116 type="radio"
117 class="google_fonts_option"
118 name="gfonts_method"
119 value="async"
120 <?php checked('async' === $wpo_minify_options['gfonts_method']); ?>
121 >
122 <?php esc_html_e('Asynchronously load CSS files from Google Fonts', 'wp-optimize'); ?>
123 </label>
124 <span tabindex="0" data-tooltip="<?php esc_attr_e('Will use \'preload\' with LoadCSS polyfill', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
125 </div>
126 <div class="wpo-fieldgroup__subgroup">
127 <label>
128 <input
129 type="radio"
130 class="google_fonts_option"
131 name="gfonts_method"
132 value="exclude"
133 <?php checked('exclude' === $wpo_minify_options['gfonts_method']); ?>
134 >
135 <?php esc_html_e('Asynchronously load fonts from Google Fonts using JavaScript', 'wp-optimize'); ?>
136 </label>
137 <span tabindex="0" data-tooltip="<?php esc_attr_e('Use if you want to exclude the CSS from Google Fonts from performance tests.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
138 </div>
139 </fieldset>
140 </div>
141
142 <h3 class="show-if-enabled"><?php esc_html_e('Font Awesome', 'wp-optimize'); ?></h3>
143 <div class="wpo-fieldgroup show-if-enabled">
144 <p class="wpo_min-bold-green wpo_min-rowintro">
145 <?php esc_html_e('Choose how to include Font Awesome (only available if it has \'font-awesome\' in the url):', 'wp-optimize'); ?>
146 </p>
147 <fieldset>
148 <div class="wpo-fieldgroup__subgroup">
149 <label><input
150 type="radio"
151 name="fawesome_method"
152 value="inherit"
153 <?php checked('inherit' === $wpo_minify_options['fawesome_method']); ?>
154 >
155 <?php esc_html_e('Inherit from the CSS settings', 'wp-optimize'); ?>
156 </label>
157 <span tabindex="0" data-tooltip="<?php esc_attr_e('The stylesheets will be merged or inlined.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
158 </div>
159 <div class="wpo-fieldgroup__subgroup">
160 <label><input
161 type="radio"
162 name="fawesome_method"
163 value="inline"
164 <?php checked('inline' === $wpo_minify_options['fawesome_method']); ?>
165 >
166 <?php esc_html_e('Inline the Font Awesome CSS file', 'wp-optimize'); ?>
167 </label>
168 </div>
169 <div class="wpo-fieldgroup__subgroup">
170 <label>
171 <input
172 type="radio"
173 name="fawesome_method"
174 value="async"
175 <?php checked('async' === $wpo_minify_options['fawesome_method']); ?>
176 >
177 <?php esc_html_e('Asynchronously load the Font Awesome CSS file', 'wp-optimize'); ?>
178 </label>
179 <span tabindex="0" data-tooltip="<?php esc_attr_e('Will use \'preload\' with LoadCSS polyfill', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
180 </div>
181 <div class="wpo-fieldgroup__subgroup">
182 <label><input
183 type="radio"
184 name="fawesome_method"
185 value="exclude"
186 <?php checked('exclude' === $wpo_minify_options['fawesome_method']); ?>
187 >
188 <?php esc_html_e('Asynchronously load the Font Awesome stylesheet using JavaScript', 'wp-optimize'); ?>
189 </label>
190 <span tabindex="0" data-tooltip="<?php esc_attr_e('Use if you want to exclude Font Awesome from page speed tests (PageSpeed Insights, GTMetrix...)', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
191 </div>
192 </fieldset>
193 </div>
194
195 <p class="submit">
196 <input
197 class="wp-optimize-save-minify-settings button button-primary"
198 type="submit"
199 value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>"
200 >
201 <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="...">
202 <span class="save-done dashicons dashicons-yes display-none"></span>
203 </p>
204 </form>
205 </div>
206