# age-gate/3.7.3/src/Resources/views/admin/partials/fields/select.php

Age Gate, version 3.7.3. 10 lines.

- Page: https://pluginprobe.com/plugins/age-gate/3.7.3/code/src/Resources/views/admin/partials/fields/select.php
- Raw: https://pluginprobe.com/plugins/age-gate/3.7.3/raw/src/Resources/views/admin/partials/fields/select.php
- Modified: 2025-03-27T08:14:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/age-gate/3.7.3/code/src/Resources/views/admin/partials/fields/select.php#L10-L20`.

```php
<?php $this->layout('partials/fields/wrapper', ['field' => $field, 'lang' => $lang ?? false]) ?>

<?php $this->start('input') ?>
    <select name="<?php echo esc_attr($this->form_key($field_prefix . '.' . $name)) ?>" <?php echo html_build_attributes($field['attributes'] ?? []) ?>><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    <?php foreach ($field['options'] as $value => $text) : ?>
        <option value="<?php echo esc_attr($value) ?>" <?php echo (($data[$name] ?? false) ?: $field['default']) === $value ? 'selected' : ''; ?>><?php echo esc_html($text) ?></option>
        <?php endforeach; ?>
    </select>
<?php $this->stop(); ?>

```
