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
← All changes | templates/minify/settings-tab.php +106 -90 3.2.5 → 4.7.0 View file →
@@ -1,114 +1,130 @@
1 -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?>
1 +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
2 2 <div class="wpo_section wpo_group">
3 - <form>
3 + <form id="wpo_minify_settings_form">
4 4 <div id="wpo_settings_warnings"></div>
5 5
6 - <h3><?php _e('Miscellaneous', 'wp-optimize'); ?></h3>
6 + <h3><?php esc_html_e('Miscellaneous', 'wp-optimize'); ?></h3>
7 7 <div class="wpo-fieldgroup">
8 8 <fieldset>
9 - <label for="merge_inline_extra_css_js">
10 - <input
11 - name="merge_inline_extra_css_js"
12 - type="checkbox"
13 - id="merge_inline_extra_css_js"
14 - value="1"
15 - <?php echo checked($wpo_minify_options['merge_inline_extra_css_js']);?>
16 - >
17 - <?php _e('Merge inline extra css and javascript', 'wp-optimize'); ?>
18 - <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>
19 - </label>
20 - <label for="disable_when_logged_in">
21 - <input
22 - name="disable_when_logged_in"
23 - type="checkbox"
24 - id="disable_when_logged_in"
25 - value="1"
26 - <?php echo checked($wpo_minify_options['disable_when_logged_in']);?>
27 - >
28 - <?php _e('Disable Minify for logged-in users', 'wp-optimize'); ?>
29 - <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>
30 - </label>
31 - <label for="clean_header_one">
32 - <input
33 - name="clean_header_one"
34 - type="checkbox"
35 - id="clean_header_one"
36 - value="1"
37 - <?php echo checked($wpo_minify_options['clean_header_one']); ?>
38 - >
39 - <?php _e('Remove meta information from page header', 'wp-optimize'); ?>
40 - <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>
41 - </label>
42 - <label for="emoji_removal">
43 - <input
44 - name="emoji_removal"
45 - type="checkbox"
46 - id="emoji_removal"
47 - class="jsprocessor"
48 - value="1"
49 - <?php echo checked($wpo_minify_options['emoji_removal']); ?>
50 - >
51 - <?php _e('Remove default WordPress and TinyMCE icons', 'wp-optimize'); ?>
52 - <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>
53 - </label>
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" class="wpo-tooltip" 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" class="wpo-tooltip" 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" class="wpo-tooltip" 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" class="wpo-tooltip" 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>
54 62 </fieldset>
55 63 </div>
56 64
57 - <h3><?php _e('SSL options', 'wp-optimize'); ?></h3>
65 + <h3><?php esc_html_e('SSL options', 'wp-optimize'); ?></h3>
58 66 <div class="wpo-fieldgroup">
59 67 <p class="wpo_min-bold-green wpo_min-rowintro">
60 - <?php _e('Force HTTP or HTTPS on the assets generated by WP-Optimize Minify.', 'wp-optimize'); ?>
61 - <?php _e('You may need it for some CDN plugins to work:', 'wp-optimize'); ?>
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'); ?>
62 70 </p>
63 71 <fieldset>
64 - <label>
65 - <input
66 - type="radio"
67 - name="default_protocol"
68 - value="dynamic"
69 - <?php checked('dynamic' === $wpo_minify_options['default_protocol']); ?>
70 - >
71 - <?php _e('Same as home URL', 'wp-optimize'); ?> (<?php printf(__('Currently: %s', 'wp-optimize'), $default_protocol);?>)
72 - <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>
73 - </label>
74 - <label>
75 - <input
76 - type="radio"
77 - name="default_protocol"
78 - value="http"
79 - <?php checked('http' === $wpo_minify_options['default_protocol']); ?>
80 - >
81 - <?php _e('Force HTTP', 'wp-optimize'); ?>
82 - <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>
83 - </label>
84 - <label>
85 - <input
86 - type="radio"
87 - name="default_protocol"
88 - value="https"
89 - <?php checked('https' === $wpo_minify_options['default_protocol']); ?>
90 - >
91 - <?php _e('Force HTTPS', 'wp-optimize'); ?>
92 - <span tabindex="0" data-tooltip="<?php esc_attr_e('Recommended if you have SSL', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span>
93 - </label>
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" class="wpo-tooltip" 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" class="wpo-tooltip" 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" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Recommended if you have SSL', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br>
113 + </div>
94 114 </fieldset>
95 115 </div>
96 116
97 117 <?php
98 118 /**
99 - * Called before outputing the submit button in the setting fields in Minify > Advanced
119 + * Called before outputting the submit button in the setting fields in Minify > Advanced
100 120 */
101 121 do_action('wpo_minify_settings_tabs', $wpo_minify_options);
102 122 ?>
103 123
104 - <p class="submit">
105 - <input
106 - class="wp-optimize-save-minify-settings button button-primary"
107 - type="submit"
108 - value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>"
109 - >
110 - <img class="wpo_spinner" src="<?php echo esc_attr(admin_url('images/spinner-2x.gif')); ?>" alt="...">
124 + <div class="wpo-save-btn-container">
125 + <input class="wp-optimize-save-minify-settings button button-primary" type="submit" value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>">
126 + <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="...">
111 127 <span class="save-done dashicons dashicons-yes display-none"></span>
112 - </p>
128 + </div>
113 129 </form>
114 130 </div>