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 / public / shortcode / shortcode-standard.php

shortcode-standard.php in Age Gate 3.7.3, at src/Resources/views/public/shortcode/shortcode-standard.php

37 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div <?php echo $this->attr('age-gate-shortcode'); ?><?php echo ($settings->poster ? ' style="background-image: url(' . esc_url($settings->poster) . ');"' : '') ?>><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2 <form method="post" <?php echo $this->attr('age-gate-form'); ?>><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
3 <div <?php echo $this->attr('age-gate-shortcode-inner'); ?>><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
4 <?php if ($settings->inputType !== 'buttons') : ?>
5 <<?php echo esc_attr($settings->challengeElement ?: 'p') ?> <?php echo $this->attr('age-gate-challenge') ?>><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
6 <?php echo esc_html(sprintf($this->stringTemplate($settings->labelButtons, ['age' => $content->getAge($settings->anonymous)]), $content->getAge($settings->anonymous))) ?>
7 </<?php echo esc_attr($settings->challengeElement ?: 'p') ?>>
8 <?php endif ?>
9 <?php
10 try {
11 $this->insert('partials/form/sections/' . $settings->inputType);
12 } catch (Exception $e) {
13 $settings->set('inputType', 'buttons');
14 $this->insert('partials/form/sections/buttons');
15 }
16 ?>
17 <?php if ($settings->method === 'js') : ?>
18 <div <?php echo $this->attr('age-gate-errors') ?>></div><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
19 <?php endif; ?>
20
21 <?php if ($settings->method !== 'js' && $e && $c == ($postData['ag_sc'] ?? false)) : ?><?php // phpcs:ignore WordPress.Security.NonceVerification.Missing ?>
22 <div <?php echo $this->attr('age-gate-errors') ?>><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
23 <p <?php echo $this->attr('age-gate-error') ?>><?php echo $this->mdLine(end($e)) ?></p><?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
24
25 </div>
26 <?php endif; ?>
27
28 <?php if ($settings->inputType !== 'buttons') : ?>
29 <?php $this->insert('partials/form/submit') ?>
30 <?php endif; ?>
31 <input type="hidden" name="age_gate[age]" value="<?php echo esc_attr($encrypt->encrypt($content->getAge())) ?>" />
32 <input type="hidden" name="age_gate[shortcode]" value="<?php echo esc_attr($encrypt->encrypt($settings->inputType)) ?>" />
33 <input type="hidden" name="ag_sc" value="<?php echo esc_attr($c) ?>" />
34 </div>
35 </form>
36 </div>
37