PluginProbe
Age Gate / 3.7.3
Age Gate v3.7.3
3.7.3 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 All 113 releases
age-gate / src / Resources / views / admin / access.php

access.php in Age Gate 3.7.3, at src/Resources/views/admin/access.php

45 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php $this->layout('layouts/default'); ?>
2
3 <?php $data = \Asylum\Utility\Arr::undot($data); ?>
4 <div class="ag-row">
5 <?php foreach ($data['sections'] ?? [] as $key => $section) : ?>
6 <div class="ag-col">
7 <?php
8 switch ($key) {
9 case 'set_content':
10 /* translators: Indivdual content label */
11 $label = __('Restrict/Bypass indiviual content', 'age-gate');
12 break;
13 case 'set_age':
14 /* translators: Indivdual age label */
15 $label = __('Change age for indiviual content', 'age-gate');
16 break;
17 case 'reset':
18 case 'export':
19 case 'import':
20 /* translators: Permission label. %s name of the setting */
21 $label = sprintf(__('User can %s all settings', 'age-gate'), $key);
22 break;
23 default:
24 /* translators: Permission label. %s name of the setting */
25 $label = sprintf(__('Manage %s settings', 'age-gate'), $key);
26 break;
27 }
28 ?>
29
30 <p><?php echo esc_html($label) ?></p>
31 <?php foreach ($data['roles'] as $slug => $role) : ?>
32 <?php if ($slug !== 'administrator') : ?>
33 <div>
34 <label class="ag-switch">
35 <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' : '') ?> />
36 <span class="ag-switch__slider"></span>
37 </label>
38 <?php echo esc_html($role['name']) ?>
39 </div>
40 <?php endif; ?>
41 <?php endforeach; ?>
42 </div>
43 <?php endforeach; ?>
44 </div>
45