| @@ -1,14 +1,13 @@ | ||
| 1 | -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?> | |
| 1 | +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> | |
| 2 | 2 | |
| 3 | 3 | <div id="wp-optimize-general-settings" class="wpo_section wpo_group"> |
| 4 | 4 | <form action="#" method="post" enctype="multipart/form-data" name="settings_form" id="settings_form"> |
| 5 | 5 | <div id="wpo_settings_warnings"></div> |
| 6 | 6 | |
| 7 | - | |
| 8 | - <?php WP_Optimize()->include_template('settings/settings-general.php'); ?> | |
| 9 | - <?php WP_Optimize()->include_template('settings/settings-trackback-and-comments.php'); ?> | |
| 10 | - <?php WP_Optimize()->include_template('settings/settings-logging.php'); ?> | |
| 7 | + <?php WP_Optimize()->include_template('settings/settings-general.php', false, array('settings_general_data' => $settings_general_data)); ?> | |
| 8 | + <?php WP_Optimize()->include_template('settings/settings-trackback-and-comments.php', false, array('settings_trackback_data' => $settings_trackback_data, 'settings_comments_data' => $settings_comments_data)); ?> | |
| 9 | + <?php WP_Optimize()->include_template('settings/settings-logging.php', false, array('loggers_data' => $loggers_data)); ?> | |
| 11 | 10 | <?php WP_Optimize()->include_template('settings/settings-export-import.php'); ?> |
| 12 | 11 | |
| 13 | 12 | <?php do_action('wpo_after_general_settings'); ?> |
| 14 | 13 | |
| @@ -14,33 +13,42 @@ | ||
| 14 | 13 | |
| 15 | 14 | <div id="wp-optimize-settings-save-results"></div> |
| 16 | 15 | |
| 17 | 16 | <input type="hidden" name="action" value="save_redirect"> |
| 18 | - | |
| 17 | + | |
| 19 | 18 | <?php wp_nonce_field('wpo_optimization'); ?> |
| 20 | 19 | |
| 21 | - <h3 class="wpo-first-child"><?php _e('Wipe settings', 'wp-optimize'); ?></h3> | |
| 20 | + <h3 class="wpo-first-child"><?php esc_html_e('Wipe settings', 'wp-optimize'); ?></h3> | |
| 22 | 21 | |
| 23 | 22 | <div class="wpo-fieldgroup"> |
| 24 | 23 | <p> |
| 25 | - <small><?php _e('This button will delete all of WP-Optimize\'s settings. You will then need to enter all your settings again. You can also do this before deactivating/deinstalling WP-Optimize if you wish.', 'wp-optimize'); ?></small> | |
| 26 | - <br> | |
| 27 | - <br> | |
| 24 | + <small> | |
| 25 | + <?php | |
| 26 | + $message = __('This button will delete all of WP-Optimize\'s settings.', 'wp-optimize'); | |
| 27 | + $message .= ' '; | |
| 28 | + $message .= __('You will then need to enter all your settings again.', 'wp-optimize'); | |
| 29 | + $message .= ' '; | |
| 30 | + $message .= __('You can also do this before deactivating/deinstalling WP-Optimize if you wish.', 'wp-optimize'); | |
| 31 | + echo esc_html($message); | |
| 32 | + ?> | |
| 33 | + </small> | |
| 34 | + </p> | |
| 35 | + | |
| 36 | + <div class="wpo-save-btn-container"> | |
| 28 | 37 | <input class="button wpo-wipe-settings" type="button" name="wp-optimize-wipe-settings" value="<?php esc_attr_e('Wipe settings', 'wp-optimize'); ?>" /> |
| 29 | 38 | |
| 30 | - <img class="wpo_spinner" src="<?php echo esc_attr(admin_url('images/spinner-2x.gif')); ?>" alt="..."> | |
| 39 | + <img class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="..."> | |
| 31 | 40 | |
| 32 | 41 | <span class="dashicons dashicons-yes display-none save-done"></span> |
| 33 | - | |
| 34 | - </p> | |
| 42 | + </div> | |
| 35 | 43 | </div> |
| 36 | 44 | |
| 37 | - <div> | |
| 38 | - <input class="button button-primary wpo-save-settings" type="submit" name="wp-optimize-settings" value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>" /> | |
| 45 | + <div class="wpo-save-btn-container"> | |
| 46 | + <input id="wp-optimize-save-main-settings" class="button button-primary wpo-save-settings" type="submit" name="wp-optimize-settings" value="<?php esc_attr_e('Save settings', 'wp-optimize'); ?>" /> | |
| 39 | 47 | |
| 40 | - <img class="wpo_spinner wpo-saving-settings" src="<?php echo esc_attr(admin_url('images/spinner-2x.gif')); ?>" alt="..."> | |
| 48 | + <img class="wpo_spinner wpo-saving-settings" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="..."> | |
| 41 | 49 | |
| 42 | 50 | <span class="dashicons dashicons-yes display-none save-done"></span> |
| 43 | 51 | </div> |
| 44 | 52 | |
| 45 | 53 | </form> |
| 46 | -</div><!-- end #wp-optimize-general-settings --> | |
| 54 | +</div><!-- end #wp-optimize-general-settings --> | |