| @@ -1,43 +1,43 @@ | ||
| 1 | -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?> | |
| 1 | +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> | |
| 2 | 2 | |
| 3 | -<h3 class="wpo-first-child"><?php _e('Preload now', 'wp-optimize'); ?></h3> | |
| 3 | +<h3 class="wpo-first-child"><?php esc_html_e('Preload now', 'wp-optimize'); ?></h3> | |
| 4 | 4 | |
| 5 | 5 | <div class="wpo-fieldgroup"> |
| 6 | 6 | <p> |
| 7 | 7 | <input id="wp_optimize_run_cache_preload" class="button button-primary" type="submit" name="wp_optimize_run_cache_preload" value="<?php echo $is_running ? esc_attr__('Cancel', 'wp-optimize') : esc_attr__('Run now', 'wp-optimize'); ?>" <?php echo $is_running ? 'data-running="1"' : ''; ?>> |
| 8 | 8 | <span id="wp_optimize_preload_cache_status"><?php |
| 9 | - echo htmlspecialchars($status_message); | |
| 9 | + echo esc_html($status_message); | |
| 10 | 10 | ?></span> |
| 11 | 11 | </p> |
| 12 | 12 | <span> |
| 13 | - <?php _e('This action will trigger WP-Optimize to cache the site by visiting pages to preload them (so that they are ready the first time a human visitor wants them).', 'wp-optimize'); ?> | |
| 14 | - <?php _e('If a sitemap is available, then it will be used to determine which content gets cached.', 'wp-optimize'); ?> | |
| 13 | + <?php esc_html_e('This action will trigger WP-Optimize to cache the site by visiting pages to preload them (so that they are ready the first time a human visitor wants them).', 'wp-optimize'); ?> | |
| 14 | + <?php esc_html_e('If a sitemap is available, then it will be used to determine which content gets cached.', 'wp-optimize'); ?> | |
| 15 | 15 | </span> |
| 16 | 16 | </div> |
| 17 | 17 | |
| 18 | -<h3 class="wpo-first-child"><?php _e('Schedule preloader', 'wp-optimize'); ?></h3> | |
| 18 | +<h3 class="wpo-first-child"><?php esc_html_e('Schedule preloader', 'wp-optimize'); ?></h3> | |
| 19 | 19 | |
| 20 | 20 | <div class="wpo-fieldgroup"> |
| 21 | 21 | <p> |
| 22 | 22 | <label> |
| 23 | 23 | <input name="enable_schedule_preload" id="enable_schedule_preload" class="cache-settings" type="checkbox" value="true" <?php checked($wpo_cache_options['enable_schedule_preload']); ?>> |
| 24 | - <?php _e('Activate scheduled cache preloading', 'wp-optimize'); ?> | |
| 24 | + <?php esc_html_e('Activate scheduled cache preloading', 'wp-optimize'); ?> | |
| 25 | 25 | </label> |
| 26 | 26 | <p> |
| 27 | - <?php _e('The scheduled preloading will run automatically in your chosen time period.', 'wp-optimize'); ?> | |
| 27 | + <?php esc_html_e('The scheduled preloading will run automatically in your chosen time period.', 'wp-optimize'); ?> | |
| 28 | 28 | </p> |
| 29 | 29 | </p> |
| 30 | 30 | |
| 31 | - <label for="preload_schedule_type"><?php _e('Select schedule type', 'wp-optimize'); ?></label><br> | |
| 31 | + <label for="preload_schedule_type"><?php esc_html_e('Select schedule type', 'wp-optimize'); ?></label> | |
| 32 | 32 | |
| 33 | - <select id="preload_schedule_type" class="cache-settings" name="preload_schedule_type" disabled> | |
| 33 | + <select id="preload_schedule_type" class="cache-settings wpo-select2" name="preload_schedule_type" disabled> | |
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | 36 | |
| 37 | 37 | foreach ($schedule_options as $opt_id => $opt_description) { |
| 38 | 38 | ?> |
| 39 | - <option value="<?php echo esc_attr($opt_id); ?>" <?php selected($wpo_cache_options['preload_schedule_type'], $opt_id); ?> <?php if ('wpo_use_cache_lifespan' == $opt_id && $wpo_cache_options['page_cache_length_value'] <= 0) disabled(true); ?>><?php echo htmlspecialchars($opt_description); ?></option> | |
| 39 | + <option value="<?php echo esc_attr($opt_id); ?>" <?php selected($wpo_cache_options['preload_schedule_type'], $opt_id); ?> <?php if ('wpo_use_cache_lifespan' === $opt_id && $wpo_cache_options['page_cache_length_value'] <= 0) disabled(true); ?>><?php echo esc_html($opt_description); ?></option> | |
| 40 | 40 | <?php |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | ?> |
| @@ -45,9 +45,11 @@ | ||
| 45 | 45 | </select> |
| 46 | 46 | |
| 47 | 47 | </div> |
| 48 | 48 | |
| 49 | -<input id="wp-optimize-save-cache-preload-settings" class="button button-primary" type="submit" name="wp-optimize-save-cache-preload-settings" value="<?php esc_attr_e('Save changes', 'wp-optimize');?>"> | |
| 49 | +<div class="wpo-save-btn-container"> | |
| 50 | + <input id="wp-optimize-save-cache-preload-settings" class="button button-primary" type="submit" name="wp-optimize-save-cache-preload-settings" value="<?php esc_attr_e('Save changes', 'wp-optimize');?>"> | |
| 50 | 51 | |
| 51 | -<img class="wpo_spinner" src="<?php echo esc_attr(admin_url('images/spinner-2x.gif')); ?>" alt="..."> | |
| 52 | + <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="..."> | |
| 52 | 53 | |
| 53 | -<span class="save-done dashicons dashicons-yes display-none"></span> | |
| 54 | + <span class="save-done dashicons dashicons-yes display-none"></span> | |
| 55 | +</div> | |