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