| 1 |
<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?> |
| 2 |
|
| 3 |
<h3 class="wpo-first-child"><?php _e('General settings', 'wp-optimize'); ?></h3> |
| 4 |
<div class="wpo-fieldgroup"> |
| 5 |
<p> |
| 6 |
<?php _e('Whether manually or on a schedule, these settings apply whenever a relevant optimization is run.', 'wp-optimize'); ?> |
| 7 |
</p> |
| 8 |
<p> |
| 9 |
<input name="enable-retention" id="enable-retention" type="checkbox" value ="true" <?php echo ($options->get_option('retention-enabled') == 'true') ? 'checked="checked"' : ''; ?> /> |
| 10 |
<?php |
| 11 |
$retention_period = max((int) $options->get_option('retention-period', '2'), 1); |
| 12 |
|
| 13 |
echo '<label for="enable-retention">'; |
| 14 |
printf( |
| 15 |
__('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="'.$retention_period.'"><label for="enable-retention">' |
| 17 |
); |
| 18 |
echo '</label>'; |
| 19 |
?> |
| 20 |
<br> |
| 21 |
<small><?php _e('This option will, where relevant, retain data from the chosen period, and remove any garbage data before that period.', 'wp-optimize').' '.__('If the option is not active, then all garbage data will be removed.', 'wp-optimize').' '.__('This will also affect Auto Clean-up process', 'wp-optimize'); ?></small> |
| 22 |
</p> |
| 23 |
<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"' : ''; ?> /> |
| 25 |
<?php |
| 26 |
$revisions_retention_count = (int) $options->get_option('revisions-retention-count', '2'); |
| 27 |
|
| 28 |
echo '<label for="enable-revisions-retention">'; |
| 29 |
printf( |
| 30 |
__('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="'.$revisions_retention_count.'"><label for="revisions-retention-count">' |
| 32 |
); |
| 33 |
echo '</label>'; |
| 34 |
?> |
| 35 |
<br> |
| 36 |
<small><?php _e('This option will retain specified number of post revisions, and remove other revisions.', 'wp-optimize').' '.__('If the option is not active, then all garbage data will be removed.', 'wp-optimize').' '.__('This will also affect Auto Clean-up process', 'wp-optimize'); ?></small> |
| 37 |
</p> |
| 38 |
<?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> |
| 40 |
|