| 1 |
<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?> |
| 2 |
|
| 3 |
<h3><?php esc_html_e('Scheduled clean-up settings', 'wp-optimize'); ?></h3> |
| 4 |
<p> |
| 5 |
<a href="<?php echo esc_url($settings_cleanup_data['data']['premium_version_link']); ?>&utm_content=take-control-of-cleanups" target="_blank"><?php esc_html_e('Take control of clean-ups: Upgrade to Premium for a more powerful and flexible scheduler', 'wp-optimize'); ?></a> |
| 6 |
</p> |
| 7 |
|
| 8 |
<div class="wpo-fieldgroup"> |
| 9 |
|
| 10 |
<p> |
| 11 |
|
| 12 |
<input name="enable-schedule" id="enable-schedule" type="checkbox" value="true" <?php checked($settings_cleanup_data['data']['enable_schedule'], 'true'); ?>> |
| 13 |
<label for="enable-schedule"><?php esc_html_e('Enable scheduled clean-up and optimization', 'wp-optimize'); ?></label> |
| 14 |
|
| 15 |
</p> |
| 16 |
|
| 17 |
<div id="wp-optimize-auto-options"> |
| 18 |
|
| 19 |
<p> |
| 20 |
|
| 21 |
<?php esc_html_e('Select schedule type (default is Weekly)', 'wp-optimize'); ?><br> |
| 22 |
<select id="schedule_type" name="schedule_type"> |
| 23 |
|
| 24 |
<?php |
| 25 |
|
| 26 |
foreach ($settings_cleanup_data['data']['schedule_options'] as $option) { |
| 27 |
?> |
| 28 |
<option value="<?php echo esc_attr($option['id']); ?>" <?php selected($option['selected']); ?>><?php echo esc_html($option['label']); ?></option> |
| 29 |
<?php |
| 30 |
} |
| 31 |
|
| 32 |
?> |
| 33 |
|
| 34 |
</select> |
| 35 |
|
| 36 |
</p> |
| 37 |
|
| 38 |
<?php |
| 39 |
|
| 40 |
foreach ($settings_cleanup_data['data']['optimizations'] as $optimization) { |
| 41 |
|
| 42 |
$auto_id = $optimization['id']; |
| 43 |
|
| 44 |
$auto_dom_id = $optimization['dom_id']; |
| 45 |
|
| 46 |
$setting_activated = $optimization['activated']; |
| 47 |
?> |
| 48 |
<p> |
| 49 |
<input name="wp-optimize-auto[<?php echo esc_attr($auto_id); ?>]" id="<?php echo esc_attr($auto_dom_id); ?>" type="checkbox" value="true" <?php checked($setting_activated); ?>> <label for="<?php echo esc_attr($auto_dom_id); ?>"><?php echo esc_html($optimization['label']); ?></label> |
| 50 |
</p> |
| 51 |
<?php |
| 52 |
} |
| 53 |
?> |
| 54 |
|
| 55 |
<!-- disabled email notification |
| 56 |
<p> |
| 57 |
<label> |
| 58 |
<input name="enable-email" id="enable-email" type="checkbox" value ="true" /> |
| 59 |
</label> |
| 60 |
</p> |
| 61 |
<p> |
| 62 |
<label for="enable-email-address"> |
| 63 |
<input name="enable-email-address" id="enable-email-address" type="text" value ="" /> |
| 64 |
</label> |
| 65 |
</p> --> |
| 66 |
|
| 67 |
</div><!-- END #wp-optimize-auto-options --> |
| 68 |
</div><!-- END .wpo-fieldgroup --> |