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

147 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (!defined('WPO_VERSION')) 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 <?php if (WP_OPTIMIZE_SHOW_MINIFY_ADVANCED) : ?>
9 <label for="merge_google_fonts">
10 <input
11 name="merge_google_fonts"
12 type="checkbox"
13 id="merge_google_fonts"
14 value="1"
15 <?php echo checked($wpo_minify_options['merge_google_fonts']); ?>
16 >
17 <?php esc_html_e('Merge fonts from Google Fonts into one request', 'wp-optimize'); ?>
18 <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>
19 </label>
20 <?php endif; ?>
21 <label for="remove_googlefonts">
22 <input
23 name="remove_googlefonts"
24 type="checkbox"
25 id="remove_googlefonts"
26 value="1"
27 <?php echo checked($wpo_minify_options['remove_googlefonts']); ?>
28 >
29 <?php esc_html_e('Do not load Google Fonts', 'wp-optimize'); ?>
30 <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>
31 </label>
32 <label for="enable_display_swap">
33 <input
34 name="enable_display_swap"
35 type="checkbox"
36 id="enable_display_swap"
37 value="1"
38 <?php echo checked($wpo_minify_options['enable_display_swap']); ?>
39 >
40 <?php esc_html_e('Add "display=swap" to Google Fonts requests', 'wp-optimize'); ?>
41 <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>
42 </label>
43 </fieldset>
44 <p class="wpo_min-bold-green wpo_min-rowintro">
45 <?php esc_html_e('Choose how to include fonts from Google Fonts on your pages, when available:', 'wp-optimize'); ?>
46 </p>
47 <fieldset>
48 <label>
49 <input
50 type="radio"
51 name="gfonts_method"
52 value="inherit"
53 <?php echo checked('inherit' === $wpo_minify_options['gfonts_method']); ?>
54 >
55 <?php esc_html_e('Inherit from the CSS settings', 'wp-optimize'); ?>
56 <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>
57 </label>
58 <label>
59 <input
60 type="radio"
61 name="gfonts_method"
62 value="inline"
63 <?php echo checked('inline' === $wpo_minify_options['gfonts_method']); ?>
64 >
65 <?php esc_html_e('Inline google font CSS files', 'wp-optimize'); ?>
66 <span tabindex="0" data-tooltip="<?php esc_attr_e('The stylesheets will be inlined.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span>
67 </label>
68 <label>
69 <input
70 type="radio"
71 name="gfonts_method"
72 value="async"
73 <?php echo checked('async' === $wpo_minify_options['gfonts_method']); ?>
74 >
75 <?php esc_html_e('Asynchronously load CSS files from Google Fonts', 'wp-optimize'); ?>
76 <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>
77 </label>
78 <label>
79 <input
80 type="radio"
81 name="gfonts_method"
82 value="exclude"
83 <?php echo checked('exclude' === $wpo_minify_options['gfonts_method']); ?>
84 >
85 <?php esc_html_e('Asynchronously load fonts from Google Fonts using JavaScript', 'wp-optimize'); ?>
86 <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>
87 </label>
88 </fieldset>
89 </div>
90
91 <h3><?php esc_html_e('Font Awesome', 'wp-optimize'); ?></h3>
92 <div class="wpo-fieldgroup">
93 <p class="wpo_min-bold-green wpo_min-rowintro">
94 <?php esc_html_e('Choose how to include Font Awesome (only available if it has \'font-awesome\' in the url):', 'wp-optimize'); ?>
95 </p>
96 <fieldset>
97 <label><input
98 type="radio"
99 name="fawesome_method"
100 value="inherit"
101 <?php echo checked('inherit' === $wpo_minify_options['fawesome_method']); ?>
102 >
103 <?php esc_html_e('Inherit from the CSS settings', 'wp-optimize'); ?>
104 <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>
105 </label>
106 <label><input
107 type="radio"
108 name="fawesome_method"
109 value="inline"
110 <?php echo checked('inline' === $wpo_minify_options['fawesome_method']); ?>
111 >
112 <?php esc_html_e('Inline the Font Awesome CSS file', 'wp-optimize'); ?>
113 </label>
114 <label>
115 <input
116 type="radio"
117 name="fawesome_method"
118 value="async"
119 <?php echo checked('async' === $wpo_minify_options['fawesome_method']); ?>
120 >
121 <?php esc_html_e('Asynchronously load the Font Awesome CSS file', 'wp-optimize'); ?>
122 <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>
123 </label>
124 <label><input
125 type="radio"
126 name="fawesome_method"
127 value="exclude"
128 <?php echo checked('exclude' === $wpo_minify_options['fawesome_method']); ?>
129 >
130 <?php esc_html_e('Asynchronously load the Font Awesome stylesheet using JavaScript', 'wp-optimize'); ?>
131 <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>
132 </label>
133 </fieldset>
134 </div>
135
136 <p class="submit">
137 <input
138 class="wp-optimize-save-minify-settings button button-primary"
139 type="submit"
140 value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>"
141 >
142 <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); ?>" alt="...">
143 <span class="save-done dashicons dashicons-yes display-none"></span>
144 </p>
145 </form>
146 </div>
147