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 / cc-expiration.php

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

53 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 * Displays the credit card expiration select boxes.
4 *
5 * Override this template by copying it to yourtheme/charitable/cc-expiration.php
6 *
7 * @author Studio 164a
8 * @package Charitable/Templates/Donation Form
9 * @since 1.0.0
10 * @version 1.0.0
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) { exit; }
15
16 if ( ! isset( $view_args['form'] ) || ! isset( $view_args['field'] ) ) {
17 return;
18 }
19
20 $form = $view_args['form'];
21 $field = $view_args['field'];
22 $classes = $view_args['classes'];
23 $is_required = isset( $field['required'] ) ? $field['required'] : false;
24 $current_year = date( 'Y' );
25
26 ?>
27 <div id="charitable_field_<?php echo $field['key'] ?>" class="<?php echo $classes ?>">
28 <fieldset class="charitable-fieldset-field-wrapper">
29 <?php if ( isset( $field['label'] ) ) : ?>
30 <div class="charitable-fieldset-field-header" id="charitable_field_<?php echo esc_attr( $field['key'] ) ?>_label">
31 <?php echo $field['label'] ?>
32 <?php if ( $is_required ) : ?>
33 <abbr class="required" title="required">*</abbr>
34 <?php endif ?>
35 </div>
36 <?php endif ?>
37 <select name="<?php echo $field['key'] ?>[month]" class="month" aria-describedby="charitable_field_<?php echo esc_attr( $field['key'] ) ?>_label">
38 <?php foreach ( range( 1, 12 ) as $month ) :
39 $padded_month = sprintf( '%02d', $month );
40 ?>
41 <option value="<?php echo $padded_month ?>"><?php echo $padded_month ?></option>
42 <?php endforeach ?>
43 </select>
44 <select name="<?php echo $field['key'] ?>[year]" class="year" aria-describedby="charitable_field_<?php echo esc_attr( $field['key'] ) ?>_label">
45 <?php for ( $i = 0; $i < 15; $i++ ) :
46 $year = $current_year + $i;
47 ?>
48 <option value="<?php echo $year ?>"><?php echo $year ?></option>
49 <?php endfor ?>
50 </select>
51 </fieldset><!-- .charitable-field-wrapper -->
52 </div><!-- #charitable_field_<?php echo $field['key'] ?> -->
53