| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | <?php checked($wpo_minify_options['enable_merging_of_js']); ?> |
| 35 | 35 | > |
| 36 | 36 | <?php esc_html_e('Enable merging of JavaScript files', 'wp-optimize'); ?> |
| 37 | 37 | </label> |
| 38 | - <span tabindex="0" data-tooltip="<?php echo esc_attr($tooltip); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 38 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php echo esc_attr($tooltip); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 39 | 39 | </div> |
| 40 | 40 | <div class="wpo-fieldgroup__subgroup"> |
| 41 | 41 | <label for="enable_js_trycatch"> |
| 42 | 42 | <input |
| @@ -53,9 +53,9 @@ | ||
| 53 | 53 | $message .= ' '; |
| 54 | 54 | $message .= __('This means that if one file has an error, it should not impede execution of other, independent files.', 'wp-optimize'); |
| 55 | 55 | ?> |
| 56 | 56 | </label> |
| 57 | - <span tabindex="0" data-tooltip="<?php echo esc_attr($message); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 57 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php echo esc_attr($message); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 58 | 58 | </div> |
| 59 | 59 | </fieldset> |
| 60 | 60 | </div> |
| 61 | 61 | |
| @@ -63,21 +63,23 @@ | ||
| 63 | 63 | |
| 64 | 64 | <h3 class="show-if-enabled"><?php esc_html_e('Exclude JavaScript from processing', 'wp-optimize'); ?></h3> |
| 65 | 65 | <div class="wpo-fieldgroup show-if-enabled"> |
| 66 | 66 | <fieldset> |
| 67 | - <label for="exclude_js"> | |
| 68 | - <?php esc_html_e('Any JavaScript files that match the paths below will be completely ignored', 'wp-optimize'); ?> | |
| 69 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Use this if you are having issues with a certain JavaScript file.', 'wp-optimize'); ?> <?php esc_attr_e('Any file present here will be loaded normally by WordPress', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 70 | - </label> | |
| 71 | - <textarea | |
| 72 | - name="exclude_js" | |
| 73 | - rows="7" cols="50" | |
| 74 | - id="exclude_js" | |
| 75 | - class="large-text code" | |
| 76 | - placeholder="<?php esc_attr_e('e.g.: /wp-includes/js/jquery/jquery.js', 'wp-optimize'); ?>" | |
| 77 | - ><?php echo esc_textarea($wpo_minify_options['exclude_js']);?></textarea> | |
| 78 | - <br> | |
| 79 | - <?php esc_html_e('Some files known for causing issues when combined / minified are excluded by default.', 'wp-optimize'); ?> <?php esc_html_e('You can see / edit them in the Advanced tab.', 'wp-optimize'); ?> | |
| 67 | + <div class="wpo-fieldgroup__subgroup"> | |
| 68 | + <label for="exclude_js"> | |
| 69 | + <?php esc_html_e('Any JavaScript files that match the paths below will be completely ignored', 'wp-optimize'); ?> | |
| 70 | + </label> | |
| 71 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Use this if you are having issues with a certain JavaScript file.', 'wp-optimize'); ?> <?php esc_attr_e('Any file present here will be loaded normally by WordPress', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 72 | + <textarea | |
| 73 | + name="exclude_js" | |
| 74 | + rows="7" cols="50" | |
| 75 | + id="exclude_js" | |
| 76 | + class="large-text code" | |
| 77 | + placeholder="<?php esc_attr_e('e.g.: /wp-includes/js/jquery/jquery.js', 'wp-optimize'); ?>" | |
| 78 | + ><?php echo esc_textarea($wpo_minify_options['exclude_js']);?></textarea> | |
| 79 | + <br> | |
| 80 | + <?php esc_html_e('Some files known for causing issues when combined / minified are excluded by default.', 'wp-optimize'); ?> <?php esc_html_e('You can see / edit them in the Advanced tab.', 'wp-optimize'); ?> | |
| 81 | + </div> | |
| 80 | 82 | </fieldset> |
| 81 | 83 | </div> |
| 82 | 84 | |
| 83 | 85 | <h3 class="show-if-enabled"><?php esc_html_e('Defer JavaScript', 'wp-optimize'); ?></h3> |
| @@ -92,9 +94,9 @@ | ||
| 92 | 94 | <?php checked($wpo_minify_options['enable_defer_js'], 'individual'); ?> |
| 93 | 95 | > |
| 94 | 96 | <?php esc_html_e('Asynchronously load selected JavaScript files', 'wp-optimize'); ?> |
| 95 | 97 | </label> |
| 96 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('The files in the list will be loaded asynchronously, and will not be minified or merged.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> | |
| 98 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('The files in the list will be loaded asynchronously, and will not be minified or merged.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> | |
| 97 | 99 | </h4> |
| 98 | 100 | </div> |
| 99 | 101 | <div class="defer-js-settings"> |
| 100 | 102 | <div class="wpo-fieldgroup__subgroup"> |
| @@ -106,10 +108,10 @@ | ||
| 106 | 108 | $message = __('Independent scripts are for example \'analytics\' or \'pixel\' scripts.', 'wp-optimize'); |
| 107 | 109 | $message .= ' '; |
| 108 | 110 | $message .= __('They are not required for the website to work', 'wp-optimize'); |
| 109 | 111 | ?> |
| 110 | - <span tabindex="0" data-tooltip="<?php echo esc_attr($message);?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 111 | 112 | </label> |
| 113 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php echo esc_attr($message);?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 112 | 114 | <textarea |
| 113 | 115 | name="async_js" |
| 114 | 116 | rows="7" |
| 115 | 117 | cols="50" |
| @@ -128,9 +130,9 @@ | ||
| 128 | 130 | <?php checked($wpo_minify_options['exclude_js_from_page_speed_tools']); ?> |
| 129 | 131 | > |
| 130 | 132 | <?php esc_html_e('Exclude scripts from page speed tests (PageSpeed Insights, GTMetrix...)', 'wp-optimize'); ?> |
| 131 | 133 | </label> |
| 132 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Use this only for testing purpose to find out which scripts are slowing down your site.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> | |
| 134 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Use this only for testing purpose to find out which scripts are slowing down your site.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span><br> | |
| 133 | 135 | </div> |
| 134 | 136 | </div> |
| 135 | 137 | </fieldset> |
| 136 | 138 | |
| @@ -145,9 +147,9 @@ | ||
| 145 | 147 | <?php checked($wpo_minify_options['enable_defer_js'], 'all'); ?> |
| 146 | 148 | > |
| 147 | 149 | <?php esc_html_e('Defer all the JavaScript files', 'wp-optimize'); ?> |
| 148 | 150 | </label> |
| 149 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('All files - including the ones processed by WP-Optimize - will be deferred, except the ones in the exclusion list above.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 151 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('All files - including the ones processed by WP-Optimize - will be deferred, except the ones in the exclusion list above.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 150 | 152 | </h4> |
| 151 | 153 | </div> |
| 152 | 154 | <div class="defer-js-settings"> |
| 153 | 155 | <div class="notice notice-warning below-h2"> |
| @@ -165,9 +167,9 @@ | ||
| 165 | 167 | <?php checked($wpo_minify_options['defer_js_type'], 'defer'); ?> |
| 166 | 168 | > |
| 167 | 169 | <?php esc_html_e('Use the "defer" html attribute', 'wp-optimize'); ?> |
| 168 | 170 | </label> |
| 169 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Supported by all modern browsers.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 171 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Supported by all modern browsers.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 170 | 172 | </div> |
| 171 | 173 | <div class="wpo-fieldgroup__subgroup"> |
| 172 | 174 | <label> |
| 173 | 175 | <input |
| @@ -200,9 +202,9 @@ | ||
| 200 | 202 | <?php checked($wpo_minify_options['defer_jquery']); ?> |
| 201 | 203 | > |
| 202 | 204 | <?php esc_html_e('Defer jQuery', 'wp-optimize'); ?> <em><?php esc_html_e('(Note that as jQuery is a common dependency, it probably needs to be loaded synchronously).', 'wp-optimize'); ?></em> |
| 203 | 205 | </label> |
| 204 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Disable this setting if you have an error \'jQuery undefined\'.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 206 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Disable this setting if you have an error \'jQuery undefined\'.', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 205 | 207 | </div> |
| 206 | 208 | </div> |
| 207 | 209 | </fieldset> |
| 208 | 210 | </div> |
| @@ -219,9 +221,9 @@ | ||
| 219 | 221 | <?php checked($wpo_minify_options['enable_delay_js'], true); ?> |
| 220 | 222 | > |
| 221 | 223 | <?php esc_html_e('Delay JS', 'wp-optimize'); ?> |
| 222 | 224 | </label> |
| 223 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Delays JavaScript file loading until the user interacts with the page (e.g., mouse movement, scrolling, or touch), thereby improving page load performance', 'wp-optimize'); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 225 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Delays JavaScript file loading until the user interacts with the page (e.g., mouse movement, scrolling, or touch), thereby improving page load performance', 'wp-optimize'); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 224 | 226 | </h4> |
| 225 | 227 | </div> |
| 226 | 228 | |
| 227 | 229 | <div class="wpo-fieldgroup__subgroup"> |
| @@ -233,9 +235,9 @@ | ||
| 233 | 235 | <?php checked($wpo_minify_options['enable_preload_js'], true); ?> |
| 234 | 236 | > |
| 235 | 237 | <?php esc_html_e('Preload JavaScript files', 'wp-optimize'); ?> |
| 236 | 238 | </label> |
| 237 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Preloads JavaScript files in parallel with other resources ahead of time, ensuring they are ready for faster execution without impacting the overall page load time', 'wp-optimize'); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 239 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Preloads JavaScript files in parallel with other resources ahead of time, ensuring they are ready for faster execution without impacting the overall page load time', 'wp-optimize'); ?>"><span class="dashicons dashicons-editor-help"></span> </span> | |
| 238 | 240 | </h4> |
| 239 | 241 | </div> |
| 240 | 242 | |
| 241 | 243 | <div class="wpo-fieldgroup__subgroup"> |
| @@ -242,9 +244,9 @@ | ||
| 242 | 244 | <label for="exclude_delay_js"> |
| 243 | 245 | <?php esc_html_e('Any JavaScript files that match the paths below will be completely ignored.', 'wp-optimize'); ?> |
| 244 | 246 | <?php esc_html_e('It is also possible to exclude scripts by adding the "data-no-delay-js" attribute.', 'wp-optimize'); ?> |
| 245 | 247 | </label> |
| 246 | - <span tabindex="0" data-tooltip="<?php esc_attr_e('Use this if you are having issues with a specific JavaScript file.', 'wp-optimize'); ?> <?php esc_attr_e('Any file present here will be loaded normally by WordPress', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 248 | + <span tabindex="0" class="wpo-tooltip" data-tooltip="<?php esc_attr_e('Use this if you are having issues with a specific JavaScript file.', 'wp-optimize'); ?> <?php esc_attr_e('Any file present here will be loaded normally by WordPress', 'wp-optimize');?>"><span class="dashicons dashicons-editor-help"></span></span> | |
| 247 | 249 | |
| 248 | 250 | <textarea |
| 249 | 251 | name="exclude_delay_js" |
| 250 | 252 | rows="7" cols="50" |
| @@ -263,15 +265,11 @@ | ||
| 263 | 265 | </div> |
| 264 | 266 | </fieldset> |
| 265 | 267 | </div> |
| 266 | 268 | |
| 267 | - <p class="submit"> | |
| 268 | - <input | |
| 269 | - class="wp-optimize-save-minify-settings button button-primary" | |
| 270 | - type="submit" | |
| 271 | - value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>" | |
| 272 | - > | |
| 269 | + <div class="wpo-save-btn-container"> | |
| 270 | + <input class="wp-optimize-save-minify-settings button button-primary" type="submit" value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>"> | |
| 273 | 271 | <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="..."> |
| 274 | 272 | <span class="save-done dashicons dashicons-yes display-none"></span> |
| 275 | - </p> | |
| 273 | + </div> | |
| 276 | 274 | </form> |
| 277 | 275 | </div> |