| 1 |
<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> |
| 2 |
<div class="wpo_section wpo_group"> |
| 3 |
<form id="wpo_minify_settings_form"> |
| 4 |
<div id="wpo_settings_warnings"></div> |
| 5 |
|
| 6 |
<h3><?php esc_html_e('Miscellaneous', 'wp-optimize'); ?></h3> |
| 7 |
<div class="wpo-fieldgroup"> |
| 8 |
<fieldset> |
| 9 |
<div class="wpo-fieldgroup__subgroup"> |
| 10 |
<label for="merge_inline_extra_css_js"> |
| 11 |
<input |
| 12 |
name="merge_inline_extra_css_js" |
| 13 |
type="checkbox" |
| 14 |
id="merge_inline_extra_css_js" |
| 15 |
value="1" |
| 16 |
<?php echo checked($wpo_minify_options['merge_inline_extra_css_js']);?> |
| 17 |
> |
| 18 |
<?php esc_html_e('Merge inline extra css and javascript', 'wp-optimize'); ?> |
| 19 |
</label> |
| 20 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('Inline JavaScript and CSS that should come before or after other enqueued files will be merged.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 21 |
</div> |
| 22 |
<div class="wpo-fieldgroup__subgroup"> |
| 23 |
<label for="disable_when_logged_in"> |
| 24 |
<input |
| 25 |
name="disable_when_logged_in" |
| 26 |
type="checkbox" |
| 27 |
id="disable_when_logged_in" |
| 28 |
value="1" |
| 29 |
<?php echo checked($wpo_minify_options['disable_when_logged_in']);?> |
| 30 |
> |
| 31 |
<?php esc_html_e('Disable Minify for logged-in users', 'wp-optimize'); ?> |
| 32 |
</label> |
| 33 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('HTML, JavaScript and CSS will be loaded normally by WordPress.', 'wp-optimize');?> <?php esc_attr_e('Useful for debugging or to improve compatibility with some visual editors.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 34 |
</div> |
| 35 |
<div class="wpo-fieldgroup__subgroup"> |
| 36 |
<label for="clean_header_one"> |
| 37 |
<input |
| 38 |
name="clean_header_one" |
| 39 |
type="checkbox" |
| 40 |
id="clean_header_one" |
| 41 |
value="1" |
| 42 |
<?php echo checked($wpo_minify_options['clean_header_one']); ?> |
| 43 |
> |
| 44 |
<?php esc_html_e('Remove meta information from page header', 'wp-optimize'); ?> |
| 45 |
</label> |
| 46 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('Remove resource hints, generator tag, shortlinks, manifest link, etc.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 47 |
</div> |
| 48 |
<div class="wpo-fieldgroup__subgroup"> |
| 49 |
<label for="emoji_removal"> |
| 50 |
<input |
| 51 |
name="emoji_removal" |
| 52 |
type="checkbox" |
| 53 |
id="emoji_removal" |
| 54 |
class="jsprocessor" |
| 55 |
value="1" |
| 56 |
<?php echo checked($wpo_minify_options['emoji_removal']); ?> |
| 57 |
> |
| 58 |
<?php esc_html_e('Remove default WordPress and TinyMCE icons', 'wp-optimize'); ?> |
| 59 |
</label> |
| 60 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('When selected, the site will use the device\'s built in Emoji', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 61 |
</div> |
| 62 |
</fieldset> |
| 63 |
</div> |
| 64 |
|
| 65 |
<h3><?php esc_html_e('SSL options', 'wp-optimize'); ?></h3> |
| 66 |
<div class="wpo-fieldgroup"> |
| 67 |
<p class="wpo_min-bold-green wpo_min-rowintro"> |
| 68 |
<?php esc_html_e('Force HTTP or HTTPS on the assets generated by WP-Optimize Minify.', 'wp-optimize'); ?> |
| 69 |
<?php esc_html_e('You may need it for some CDN plugins to work:', 'wp-optimize'); ?> |
| 70 |
</p> |
| 71 |
<fieldset> |
| 72 |
<div class="wpo-fieldgroup__subgroup"> |
| 73 |
<label> |
| 74 |
<input |
| 75 |
type="radio" |
| 76 |
name="default_protocol" |
| 77 |
value="dynamic" |
| 78 |
<?php checked('dynamic' === $wpo_minify_options['default_protocol']); ?> |
| 79 |
> |
| 80 |
<?php |
| 81 |
esc_html_e('Same as home URL', 'wp-optimize'); |
| 82 |
echo '('; |
| 83 |
// translators: %s is the current HTTP protocol |
| 84 |
printf(esc_html__('Currently: %s', 'wp-optimize'), esc_html($default_protocol)); |
| 85 |
echo ')'; |
| 86 |
?> |
| 87 |
</label> |
| 88 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('Uses your site\'s default protocol.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 89 |
</div> |
| 90 |
<div class="wpo-fieldgroup__subgroup"> |
| 91 |
<label> |
| 92 |
<input |
| 93 |
type="radio" |
| 94 |
name="default_protocol" |
| 95 |
value="http" |
| 96 |
<?php checked('http' === $wpo_minify_options['default_protocol']); ?> |
| 97 |
> |
| 98 |
<?php esc_html_e('Force HTTP', 'wp-optimize'); ?> |
| 99 |
</label> |
| 100 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('If you do not have SSL', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 101 |
</div> |
| 102 |
<div class="wpo-fieldgroup__subgroup"> |
| 103 |
<label> |
| 104 |
<input |
| 105 |
type="radio" |
| 106 |
name="default_protocol" |
| 107 |
value="https" |
| 108 |
<?php checked('https' === $wpo_minify_options['default_protocol']); ?> |
| 109 |
> |
| 110 |
<?php esc_html_e('Force HTTPS', 'wp-optimize'); ?> |
| 111 |
</label> |
| 112 |
<span tabindex="0" data-tooltip="<?php esc_attr_e('Recommended if you have SSL', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> |
| 113 |
</div> |
| 114 |
</fieldset> |
| 115 |
</div> |
| 116 |
|
| 117 |
<?php |
| 118 |
/** |
| 119 |
* Called before outputting the submit button in the setting fields in Minify > Advanced |
| 120 |
*/ |
| 121 |
do_action('wpo_minify_settings_tabs', $wpo_minify_options); |
| 122 |
?> |
| 123 |
|
| 124 |
<p class="submit"> |
| 125 |
<input |
| 126 |
class="wp-optimize-save-minify-settings button button-primary" |
| 127 |
type="submit" |
| 128 |
value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>" |
| 129 |
> |
| 130 |
<img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="..."> |
| 131 |
<span class="save-done dashicons dashicons-yes display-none"></span> |
| 132 |
</p> |
| 133 |
</form> |
| 134 |
</div> |
| 135 |
|