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 / layouts / default.php

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

32 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $model = collect($fields)->pluck('model');
3
4 $model = $model->merge($model->toArray())->flatten()->unique()->filter();
5
6 $model = $model->mapWithKeys(function($item) use ($data) {
7 return [$item => $data[$item] ?? null];
8 })->toArray();
9
10 if ($model) {
11 $model = collect($model)->map(fn($item, $key) => "$key:'$item'")->values()->implode(',');
12 }
13 ?>
14
15 <div class="wrap" <?php echo ($model ? 'x-data="{' . esc_attr($model) . '}"' : '') ?>>
16 <h2><?php echo esc_html(get_admin_page_title()) ?></h2>
17
18 <div class="ag-errors"></div>
19
20 <?php if (current_user_can($permission)) : ?>
21 <form method="post" action="<?php echo esc_url(admin_url('/admin-post.php')) ?>" id="ag-settings" class="ag-settings-form" data-form="<?php echo esc_attr($action) ?>">
22 <input type="hidden" name="action" value="age_gate_<?php echo esc_attr($action) ?>">
23 <?php wp_nonce_field('age_gate_' . $action) ?>
24 <?php echo $this->section('content'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
25
26 <button type="submit" class="button button-primary"><?php echo esc_html__('Save settings', 'age-gate') ?></button>
27 <?php /* <?php submit_button(__('Save settings', 'age-gate')) ?> */ ?>
28 </form>
29 <?php endif; ?>
30 <?php echo $this->section('after') // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
31 </div>
32