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

Age Gate, version 3.7.3. 16 lines.

- Page: https://pluginprobe.com/plugins/age-gate/3.7.3/code/src/Resources/views/admin/partials/fields/link.php
- Raw: https://pluginprobe.com/plugins/age-gate/3.7.3/raw/src/Resources/views/admin/partials/fields/link.php
- Modified: 2022-09-16T21:43:30+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/link.php#L10-L20`.

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

<?php $this->start('input') ?>

<button type="button" class="button button--link">Select link</button>
<?php if ($data[$name] ?? false) : ?>
    <button type="button" class="button button--remove">Remove link</button>
<?php endif; ?>
<input type="hidden" name="<?php echo esc_attr($this->form_key($field_prefix . '.' . $name)) ?>" value="<?php echo esc_attr($data[$name] ?? $field['default'] ?? '') ?>" />

<?php if ($data[$name] ?? false) : ?>
    <span class="link-display"><?php echo esc_html($data[$name]) ?></span>
<?php endif; ?>

<?php $this->stop(); ?>

```
