PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / src / DonationForms / resources / views / form-skeleton / section.php

section.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at src/DonationForms/resources/views/form-skeleton/section.php

43 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * One form section: a heading, a line of description, and a field per block. The amount, gateway
4 * and summary blocks get their own sketch; every other block is a label and one input row.
5 *
6 * @since 4.17.0
7 *
8 * @var string[] $blocks Block names in the section.
9 * @var int $gateways Enabled gateways; the selected one opens its fields under its row.
10 * @var string[] $variants Block name to field variant.
11 */
12 ?>
13 <div class="givewp-embed-skeleton__section">
14 <div class="givewp-embed-skeleton__section-header">
15 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__heading"></span>
16 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__line givewp-embed-skeleton__line--short"></span>
17 </div>
18 <?php foreach ($blocks as $block) : ?>
19 <?php $variant = $variants[$block] ?? 'field'; ?>
20 <div class="givewp-embed-skeleton__field givewp-embed-skeleton__field--<?= esc_attr($variant) ?>">
21 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__label"></span>
22 <?php if ($variant === 'amount') : ?>
23 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__input givewp-embed-skeleton__input--tall"></span>
24 <div class="givewp-embed-skeleton__levels">
25 <?php for ($i = 0; $i < 6; $i++) : ?>
26 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__level"></span>
27 <?php endfor; ?>
28 </div>
29 <?php elseif ($variant === 'gateways') : ?>
30 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__input"></span>
31 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__panel"></span>
32 <?php for ($i = 1; $i < $gateways; $i++) : ?>
33 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__input"></span>
34 <?php endfor; ?>
35 <?php elseif ($variant === 'summary') : ?>
36 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__panel givewp-embed-skeleton__panel--tall"></span>
37 <?php else : ?>
38 <span class="givewp-embed-skeleton__bar givewp-embed-skeleton__input"></span>
39 <?php endif; ?>
40 </div>
41 <?php endforeach; ?>
42 </div>
43