| @@ -26,9 +26,9 @@ | ||
| 26 | 26 | <!-- CSS Minification --> |
| 27 | 27 | <div class="metasync-card"> |
| 28 | 28 | <div class="metasync-card-header"> |
| 29 | 29 | <div class="metasync-card-title-group"> |
| 30 | - <h2><?php esc_html_e('CSS Minification', 'metasync'); ?></h2> | |
| 30 | + <h2><?php esc_html_e('CSS Minification', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_css_minify', 'Can break site styling/scripts if a theme or plugin script depends on exact formatting. Test your site after enabling; turn off for anything that breaks.'); ?></h2> | |
| 31 | 31 | <span class="metasync-card-subtitle"><?php esc_html_e('Strip whitespace and comments from enqueued stylesheets', 'metasync'); ?></span> |
| 32 | 32 | </div> |
| 33 | 33 | <label class="metasync-toggle <?php echo isset($conflicts['css_minify']) ? 'metasync-toggle-overridden' : ''; ?>"> |
| 34 | 34 | <input type="checkbox" name="metasync_code_min[enable_css_minify]" value="1" |
| @@ -40,9 +40,9 @@ | ||
| 40 | 40 | |
| 41 | 41 | <div class="metasync-card-body metasync-toggle-section" data-toggle="enable_css_minify" |
| 42 | 42 | <?php echo empty($settings['enable_css_minify']) ? 'style="display:none;"' : ''; ?>> |
| 43 | 43 | <div class="metasync-field"> |
| 44 | - <label for="css_exclude_handles"><?php esc_html_e('Excluded Handles', 'metasync'); ?></label> | |
| 44 | + <label for="css_exclude_handles"><?php esc_html_e('Excluded Handles', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_css_exclude_handles', 'A \'handle\' is the internal name WordPress gives a script or stylesheet. If you don\'t know it, leave this blank — the defaults protect essential files.'); ?></label> | |
| 45 | 45 | <input type="text" name="metasync_code_min[css_exclude_handles]" id="css_exclude_handles" |
| 46 | 46 | value="<?php echo esc_attr($settings['css_exclude_handles']); ?>" |
| 47 | 47 | placeholder="handle1, handle2, handle3"> |
| 48 | 48 | <p class="metasync-field-description"><?php esc_html_e('Comma-separated list of wp_enqueue_style handles to exclude from minification.', 'metasync'); ?></p> |
| @@ -53,9 +53,9 @@ | ||
| 53 | 53 | <!-- JS Minification --> |
| 54 | 54 | <div class="metasync-card"> |
| 55 | 55 | <div class="metasync-card-header"> |
| 56 | 56 | <div class="metasync-card-title-group"> |
| 57 | - <h2><?php esc_html_e('JS Minification', 'metasync'); ?></h2> | |
| 57 | + <h2><?php esc_html_e('JS Minification', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_js_minify', 'Can break site styling/scripts if a theme or plugin script depends on exact formatting. Test your site after enabling; turn off for anything that breaks.'); ?></h2> | |
| 58 | 58 | <span class="metasync-card-subtitle"><?php esc_html_e('Strip whitespace and comments from enqueued scripts', 'metasync'); ?></span> |
| 59 | 59 | </div> |
| 60 | 60 | <label class="metasync-toggle <?php echo isset($conflicts['js_minify']) ? 'metasync-toggle-overridden' : ''; ?>"> |
| 61 | 61 | <input type="checkbox" name="metasync_code_min[enable_js_minify]" value="1" |
| @@ -67,9 +67,9 @@ | ||
| 67 | 67 | |
| 68 | 68 | <div class="metasync-card-body metasync-toggle-section" data-toggle="enable_js_minify" |
| 69 | 69 | <?php echo empty($settings['enable_js_minify']) ? 'style="display:none;"' : ''; ?>> |
| 70 | 70 | <div class="metasync-field"> |
| 71 | - <label for="js_exclude_handles"><?php esc_html_e('Excluded Handles', 'metasync'); ?></label> | |
| 71 | + <label for="js_exclude_handles"><?php esc_html_e('Excluded Handles', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_js_exclude_handles', 'A \'handle\' is the internal name WordPress gives a script or stylesheet. If you don\'t know it, leave this blank — the defaults protect essential files.'); ?></label> | |
| 72 | 72 | <input type="text" name="metasync_code_min[js_exclude_handles]" id="js_exclude_handles" |
| 73 | 73 | value="<?php echo esc_attr($settings['js_exclude_handles']); ?>" |
| 74 | 74 | placeholder="handle1, handle2, handle3"> |
| 75 | 75 | <p class="metasync-field-description"><?php esc_html_e('Comma-separated list of wp_enqueue_script handles to exclude from minification.', 'metasync'); ?></p> |
| @@ -86,9 +86,9 @@ | ||
| 86 | 86 | <!-- JS Defer --> |
| 87 | 87 | <div class="metasync-card"> |
| 88 | 88 | <div class="metasync-card-header"> |
| 89 | 89 | <div class="metasync-card-title-group"> |
| 90 | - <h2><?php esc_html_e('JS Defer', 'metasync'); ?></h2> | |
| 90 | + <h2><?php esc_html_e('JS Defer', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_js_defer', 'Loads scripts after the page appears, speeding up display. Some interactive features may briefly stop working — if a slider or form breaks, turn this off or exclude that script.'); ?></h2> | |
| 91 | 91 | <span class="metasync-card-subtitle"><?php esc_html_e('Add defer attribute to non-essential scripts to prevent render blocking', 'metasync'); ?></span> |
| 92 | 92 | </div> |
| 93 | 93 | <label class="metasync-toggle <?php echo isset($conflicts['js_defer']) ? 'metasync-toggle-overridden' : ''; ?>"> |
| 94 | 94 | <input type="checkbox" name="metasync_code_min[enable_js_defer]" value="1" |
| @@ -100,9 +100,9 @@ | ||
| 100 | 100 | |
| 101 | 101 | <div class="metasync-card-body metasync-toggle-section" data-toggle="enable_js_defer" |
| 102 | 102 | <?php echo empty($settings['enable_js_defer']) ? 'style="display:none;"' : ''; ?>> |
| 103 | 103 | <div class="metasync-field"> |
| 104 | - <label for="js_defer_exclude_handles"><?php esc_html_e('Excluded Handles', 'metasync'); ?></label> | |
| 104 | + <label for="js_defer_exclude_handles"><?php esc_html_e('Excluded Handles', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_js_defer_exclude_handles', 'A \'handle\' is the internal name WordPress gives a script or stylesheet. If you don\'t know it, leave this blank — the defaults protect essential files.'); ?></label> | |
| 105 | 105 | <input type="text" name="metasync_code_min[js_defer_exclude_handles]" id="js_defer_exclude_handles" |
| 106 | 106 | value="<?php echo esc_attr($settings['js_defer_exclude_handles']); ?>" |
| 107 | 107 | placeholder="jquery, jquery-core, jquery-migrate"> |
| 108 | 108 | <p class="metasync-field-description"><?php esc_html_e('Comma-separated list of script handles that should never be deferred. jQuery and core WP scripts are always excluded.', 'metasync'); ?></p> |
| @@ -113,9 +113,9 @@ | ||
| 113 | 113 | <!-- JS Delay --> |
| 114 | 114 | <div class="metasync-card"> |
| 115 | 115 | <div class="metasync-card-header"> |
| 116 | 116 | <div class="metasync-card-title-group"> |
| 117 | - <h2><?php esc_html_e('JS Delay', 'metasync'); ?></h2> | |
| 117 | + <h2><?php esc_html_e('JS Delay', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_js_delay', 'Holds heavy scripts (analytics, chat, pixels) until the visitor clicks or scrolls, then loads them automatically after 5 seconds. Improves speed but delays those tools slightly.'); ?></h2> | |
| 118 | 118 | <span class="metasync-card-subtitle"><?php esc_html_e('Delay heavy third-party scripts until user interaction (improves INP)', 'metasync'); ?></span> |
| 119 | 119 | </div> |
| 120 | 120 | <label class="metasync-toggle <?php echo isset($conflicts['js_defer']) ? 'metasync-toggle-overridden' : ''; ?>"> |
| 121 | 121 | <input type="checkbox" name="metasync_code_min[enable_js_delay]" value="1" |
| @@ -127,9 +127,9 @@ | ||
| 127 | 127 | |
| 128 | 128 | <div class="metasync-card-body metasync-toggle-section" data-toggle="enable_js_delay" |
| 129 | 129 | <?php echo empty($settings['enable_js_delay']) ? 'style="display:none;"' : ''; ?>> |
| 130 | 130 | <div class="metasync-field"> |
| 131 | - <label for="js_delay_handles"><?php esc_html_e('Delay Handles', 'metasync'); ?></label> | |
| 131 | + <label for="js_delay_handles"><?php esc_html_e('Delay Handles', 'metasync'); ?><?php Metasync::render_tooltip_icon('code_min_js_delay_handles', 'A \'handle\' is the internal name WordPress gives a script or stylesheet. If you don\'t know it, leave this blank — the defaults protect essential files.'); ?></label> | |
| 132 | 132 | <input type="text" name="metasync_code_min[js_delay_handles]" id="js_delay_handles" |
| 133 | 133 | value="<?php echo esc_attr($settings['js_delay_handles']); ?>" |
| 134 | 134 | placeholder="analytics-script, facebook-pixel"> |
| 135 | 135 | <p class="metasync-field-description"><?php esc_html_e('Comma-separated list of script handles to delay until user interaction.', 'metasync'); ?></p> |