# age-gate/3.7.3/src/Resources/views/admin/access.php

Age Gate, version 3.7.3. 45 lines.

- Page: https://pluginprobe.com/plugins/age-gate/3.7.3/code/src/Resources/views/admin/access.php
- Raw: https://pluginprobe.com/plugins/age-gate/3.7.3/raw/src/Resources/views/admin/access.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/access.php#L10-L20`.

```php
<?php $this->layout('layouts/default'); ?>

<?php $data = \Asylum\Utility\Arr::undot($data); ?>
<div class="ag-row">
    <?php foreach ($data['sections'] ?? [] as $key => $section) : ?>
        <div class="ag-col">
            <?php
                switch ($key) {
                    case 'set_content':
                        /* translators: Indivdual content label */
                        $label = __('Restrict/Bypass indiviual content', 'age-gate');
                        break;
                    case 'set_age':
                        /* translators: Indivdual age label */
                        $label = __('Change age for indiviual content', 'age-gate');
                        break;
                    case 'reset':
                    case 'export':
                    case 'import':
                        /* translators: Permission label. %s name of the setting */
                        $label = sprintf(__('User can %s all settings', 'age-gate'), $key);
                        break;
                    default:
                        /* translators: Permission label. %s name of the setting */
                        $label = sprintf(__('Manage %s settings', 'age-gate'), $key);
                        break;
                }
            ?>

            <p><?php echo esc_html($label) ?></p>
            <?php foreach ($data['roles'] as $slug => $role) : ?>
                <?php if ($slug !== 'administrator') : ?>
                    <div>
                        <label class="ag-switch">
                            <input type="checkbox" name="ag_settings[<?php echo esc_attr($key); ?>][<?php echo esc_attr($slug) ?>]" value="1" <?php echo(($role['capabilities'][$section] ?? false) ? 'checked' : '') ?> />
                            <span class="ag-switch__slider"></span>
                        </label>
                        <?php echo esc_html($role['name']) ?>
                    </div>
                <?php endif; ?>
            <?php endforeach; ?>
        </div>
    <?php endforeach; ?>
</div>

```
