Changeset 3440850
- Timestamp:
- 01/16/2026 09:03:12 AM (3 months ago)
- Location:
- jinx-fast-cache/trunk
- Files:
-
- 3 edited
-
index.php (modified) (1 diff)
-
src/Settings.php (modified) (1 diff)
-
templates/settings.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jinx-fast-cache/trunk/index.php
r3440505 r3440850 5 5 * Plugin URI: https://wordpress.org/plugins/jixn-fast-cache/ 6 6 * Description: Blazing fast full-page caching for WordPress. Jinx Fast-Cache serves static HTML files, bypassing PHP and database overhead entirely. 7 * Version: 0.9. 77 * Version: 0.9.8 8 8 * Author: Jinx Digital <hello@jinx-digital.com> 9 9 * Author URI: http://jinx-digital.com -
jinx-fast-cache/trunk/src/Settings.php
r3435708 r3440850 59 59 } 60 60 61 if (isset($input['ttl'])) { 62 $sanitized['ttl'] = sanitize_text_field($input['ttl']); 61 if (isset($input['ttl'], $input['ttl_modifier'])) { 62 63 $ttl = absint($input['ttl']); 64 $ttlModifier = sanitize_text_field($input['ttl_modifier']); 65 66 $sanitized['ttl'] = "{$ttl} {$ttlModifier}"; 67 63 68 } 64 69 -
jinx-fast-cache/trunk/templates/settings.php
r3435728 r3440850 1 1 <?php 2 2 3 use Jinx\FastCache\Plugin; 3 4 use Jinx\FastCache\Settings; 5 4 6 ?> 5 7 … … 130 132 <table class="form-table"> 131 133 134 <?php 135 136 $ttl = Settings::getOption('ttl', '3600 seconds'); 137 138 if (is_numeric($ttl)) : 139 $ttl = "{$ttl} seconds"; 140 endif; 141 142 list($ttl, $ttlModifier) = explode(' ', $ttl); 143 144 ?> 145 132 146 <tr valign="top"> 133 147 <th scope="row"><?= Plugin::t('Cache Lifespan (TTL)'); ?></th> 134 148 <td> 135 <input type="text" name="<?= Settings::getName('ttl'); ?>" value="<?= $options['ttl'] ?? 3600; ?>" class="regular-text" /> <?= Plugin::t('seconds or modifier'); ?> 136 <p class="description"><?= Plugin::t('How long a cached page remains valid. 3600 = 1 hour. Set a higher value for sites that don\'t update often. You may also use a modifier like "1 year".'); ?></p> 149 <input type="number" name="<?= Settings::getName('ttl'); ?>" value="<?= $ttl; ?>" min="1" class="small-text" /> 150 <select name="<?= Settings::getName('ttl_modifier'); ?>"> 151 <option value="seconds" <?php selected('seconds', $ttlModifier); ?>><?= Plugin::t('second(s)'); ?></option> 152 <option value="minutes" <?php selected('minutes', $ttlModifier); ?>><?= Plugin::t('minute(s)'); ?></option> 153 <option value="hours" <?php selected('hours', $ttlModifier); ?>><?= Plugin::t('hour(s)'); ?></option> 154 <option value="days" <?php selected('days', $ttlModifier); ?>><?= Plugin::t('day(s)'); ?></option> 155 <option value="weeks" <?php selected('weeks', $ttlModifier); ?>><?= Plugin::t('week(s)'); ?></option> 156 <option value="months" <?php selected('months', $ttlModifier); ?>><?= Plugin::t('month(s)'); ?></option> 157 <option value="years" <?php selected('years', $ttlModifier); ?>><?= Plugin::t('year(s)'); ?></option> 158 </select> 159 <p class="description"><?= Plugin::t('How long a cached page remains valid. Set a higher value for sites that don\'t update often.'); ?></p> 137 160 </td> 138 161 </tr>
Note: See TracChangeset
for help on using the changeset viewer.