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/database/settings-general.php +10 -12 3.4.1 → 4.7.0 View file →
@@ -1,5 +1,5 @@
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 <h3 class="wpo-first-child"><?php esc_html_e('General settings', 'wp-optimize'); ?></h3>
4 4 <div class="wpo-fieldgroup">
5 5 <p>
@@ -5,35 +5,33 @@
5 5 <p>
6 6 <?php esc_html_e('Whether manually or on a schedule, these settings apply whenever a relevant optimization is run.', 'wp-optimize'); ?>
7 7 </p>
8 8 <p>
9 - <input name="enable-retention" id="enable-retention" type="checkbox" value ="true" <?php echo ($options->get_option('retention-enabled') == 'true') ? 'checked="checked"' : ''; ?>>
9 + <input name="enable-retention" id="enable-retention" type="checkbox" value="true" <?php checked($retention_enabled); ?>>
10 10 <?php
11 - $retention_period = max((int) $options->get_option('retention-period', '2'), 1);
12 -
13 11 echo '<label for="enable-retention">';
14 12 printf(
13 + // translators: %s is number of weeks
15 14 esc_html__('Keep last %s weeks data', 'wp-optimize'),
16 - '</label><input id="retention-period" name="retention-period" type="number" step="1" min="2" max="99" value="'.esc_attr($retention_period).'"><label for="enable-retention">'
15 + '</label><input id="retention-period" name="retention-period" type="number" step="1" min="2" max="99" value="' . esc_attr($retention_period) . '"><label for="enable-retention">'
17 16 );
18 17 echo '</label>';
19 18 ?>
20 19 <br>
21 - <small><?php echo esc_html__('This option will, where relevant, retain data from the chosen period, and remove any garbage data before that period.', 'wp-optimize').' '.esc_html__('If the option is not active, then all garbage data will be removed.', 'wp-optimize').' '.esc_html__('This will also affect Auto Clean-up process', 'wp-optimize'); ?></small>
20 + <small><?php echo esc_html__('This option will, where relevant, retain data from the chosen period, and remove any garbage data before that period.', 'wp-optimize') . ' ' . esc_html__('If the option is not active, then all garbage data will be removed.', 'wp-optimize') . ' ' . esc_html__('This will also affect Auto Clean-up process', 'wp-optimize'); ?></small>
22 21 </p>
23 22 <p>
24 - <input name="enable-revisions-retention" id="enable-revisions-retention" type="checkbox" value ="true" <?php echo ('true' == $options->get_option('revisions-retention-enabled')) ? 'checked="checked"' : ''; ?>>
23 + <input name="enable-revisions-retention" id="enable-revisions-retention" type="checkbox" value="true" <?php checked($revisions_retention_enabled); ?>>
25 24 <?php
26 - $revisions_retention_count = (int) $options->get_option('revisions-retention-count', '2');
27 -
28 25 echo '<label for="enable-revisions-retention">';
29 26 printf(
27 + // translators: %s is number of revisions to keep
30 28 esc_html__('Always keep %s post revisions', 'wp-optimize'),
31 - '</label><input id="revisions-retention-count" name="revisions-retention-count" type="number" step="1" min="2" max="99" value="'.esc_attr($revisions_retention_count).'"><label for="revisions-retention-count">'
29 + '</label><input id="revisions-retention-count" name="revisions-retention-count" type="number" step="1" min="2" max="99" value="' . esc_attr($revisions_retention_count) . '"><label for="revisions-retention-count">'
32 30 );
33 31 echo '</label>';
34 32 ?>
35 33 <br>
36 - <small><?php echo esc_html__('This option will retain specified number of post revisions, and remove other revisions.', 'wp-optimize').' '.esc_html__('If the option is not active, then all garbage data will be removed.', 'wp-optimize').' '.esc_html__('This will also affect Auto Clean-up process', 'wp-optimize'); ?></small>
34 + <small><?php echo esc_html__('This option will retain specified number of post revisions, and remove other revisions.', 'wp-optimize') . ' ' . esc_html__('If the option is not active, then all garbage data will be removed.', 'wp-optimize') . ' ' . esc_html__('This will also affect Auto Clean-up process', 'wp-optimize'); ?></small>
37 35 </p>
38 36 <?php WP_Optimize()->include_template('take-a-backup.php', false, array('label' => __('Take a backup with UpdraftPlus before running scheduled optimizations', 'wp-optimize'), 'checkbox_name' => 'enable-auto-backup-scheduled')); ?>
39 -</div>
37 +</div>