PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.6.7
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.6.7
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / templates / donation-form / donation-amount.php

donation-amount.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.6.7, at templates/donation-form/donation-amount.php

81 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template used to display the donation amount inputs.
4 *
5 * Override this template by copying it to yourtheme/charitable/donation-form/donation-amount.php
6 *
7 * @author Studio 164a
8 * @package Charitable/Templates/Donation Form
9 * @since 1.0.0
10 * @version 1.5.0
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) { exit; }
14
15 if ( ! isset( $view_args['form'] ) ) {
16 return;
17 }
18
19 /* @var Charitable_Donation_Form */
20 $form = $view_args['form'];
21 $form_id = $form->get_form_identifier();
22 $campaign = $form->get_campaign();
23
24 if ( is_null( $campaign ) ) {
25 return;
26 }
27
28 $suggested = $campaign->get_suggested_donations();
29 $currency_helper = charitable_get_currency_helper();
30
31 if ( empty( $suggested ) && ! $campaign->get( 'allow_custom_donations' ) ) {
32 return;
33 }
34
35 /**
36 * Do something before the donation options fields.
37 *
38 * @since 1.0.0
39 *
40 * @param Charitable_Donation_Form $form An instance of `Charitable_Donation_Form`.
41 */
42 do_action( 'charitable_donation_form_before_donation_amount', $form );
43
44 ?>
45 <div class="charitable-donation-options">
46 <?php
47 /**
48 * @hook charitable_donation_form_before_donation_amounts
49 */
50 do_action( 'charitable_donation_form_before_donation_amounts', $form );
51
52 charitable_template_from_session( 'donation-form/donation-amount-list.php',
53 array(
54 'campaign' => $campaign,
55 'form_id' => $form_id,
56 ),
57 'donation_form_amount_field',
58 array(
59 'campaign_id' => $campaign->ID,
60 'form_id' => $form_id,
61 )
62 );
63
64 /**
65 * @hook charitable_donation_form_after_donation_amounts
66 */
67 do_action( 'charitable_donation_form_after_donation_amounts', $form );
68
69 ?>
70 </div><!-- .charitable-donation-options -->
71 <?php
72
73 /**
74 * Do something after the donation options fields.
75 *
76 * @since 1.0.0
77 *
78 * @param Charitable_Donation_Form $form An instance of `Charitable_Donation_Form`.
79 */
80 do_action( 'charitable_donation_form_after_donation_amount', $form );
81