Files
Testing/tbs/wp-content/plugins/age-gate/public/partials/form/selects.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

21 lines
1.1 KiB
PHP

<ol class="age-gate-form-elements">
<li class="age-gate-form-section">
<?php include AGE_GATE_PATH . 'public/partials/form/sections/' . ($this->restrictions->date_format === 'mmddyyyy' ? 'select-month.php' : 'select-day.php'); ?>
</li>
<li class="age-gate-form-section">
<?php include AGE_GATE_PATH . 'public/partials/form/sections/' . ($this->restrictions->date_format === 'mmddyyyy' ? 'select-day.php' : 'select-month.php'); ?>
</li>
<li class="age-gate-form-section">
<label class="age-gate-label" for="age-gate-y"><?php echo ($this->messages->labels->year) ? $this->messages->labels->year : __('Year', 'age-gate'); ?></label>
<select name="age_gate[y]" id="age-gate-y" class="age-gate-select" required>
<?php
$min_year = 1900;
$min_year = apply_filters('age_gate_select_years', $min_year);
?>
<option value=""><?php _e('YYYY', 'age-gate'); ?></option>
<?php for ($i = date('Y'); $i >= $min_year; $i--): ?>
<option value="<?php echo $i; ?>"<?php echo (isset($age['y']) && $age['y'] == $i) ? ' selected' : '' ?>><?php echo $i; ?></option>
<?php endfor; ?>
</select>
</li>
</ol>