PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.7.0.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.7.0.2
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 / includes / admin / views / metaboxes / campaign-end-date.php

campaign-end-date.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.7.0.2, at includes/admin/views/metaboxes/campaign-end-date.php

36 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Renders the end date field for the Campaign post type.
4 *
5 * @author WP Charitable LLC
6 * @package Charitable/Admin Views/Metaboxes
7 * @since 1.0.0
8 * @version 1.6.53
9 */
10
11 global $post;
12
13 $i18n = charitable()->registry()->get( 'i18n' );
14 $php_format = $i18n->get_datepicker_format( 'F d, Y' );
15 $js_format = $i18n->get_js_datepicker_format( 'MM d, yy' );
16
17 $end_date = get_post_meta( $post->ID, '_campaign_end_date', true );
18 $end_time = strtotime( $end_date );
19 $end_date_formatted = ! $end_date ? '' : date_i18n( $php_format, $end_time );
20 $title = array_key_exists( 'title', $view_args ) ? $view_args['title'] : '';
21 $description = array_key_exists( 'description', $view_args ) ? $view_args['description'] : '';
22
23 ?>
24 <div id="charitable-campaign-end-date-metabox-wrap" class="charitable-metabox-wrap">
25 <label for="campaign_end_date"><?php echo $title; ?></label>
26 <input type="text" id="campaign_end_date" name="_campaign_end_date" placeholder="&#8734;" class="charitable-datepicker" autocomplete="off" data-date="<?php echo $end_date_formatted; ?>" data-format="<?php echo $js_format; ?>" />
27 <?php if ( $end_date ) : ?>
28 <span class="charitable-end-time"><?php echo date_i18n( '@ G:i A', $end_time ); ?></span>
29 <input type="hidden" id="campaign_end_time" name="_campaign_end_time" value="<?php echo esc_attr( date_i18n( 'H:i:s', $end_time ) ); ?>" />
30 <?php else : ?>
31 <span class="charitable-end-time" style="display: none;">=</span>
32 <input type="hidden" id="campaign_end_time" name="_campaign_end_time" value="0" />
33 <?php endif ?>
34 <span class="charitable-helper"><?php echo $description; ?></span>
35 </div>
36