PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.3.4
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.3.4
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 1.7.0.9 1.8.0 All 210 releases
charitable / includes / admin / views / settings / licenses.php

licenses.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.3.4, at includes/admin/views/settings/licenses.php

49 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 * Display the table of products requiring licenses.
4 *
5 * @author Studio 164a
6 * @package Charitable/Admin View/Settings
7 * @since 1.0.0
8 */
9
10 $helper = charitable_get_helper( 'licenses' );
11 $products = $helper->get_products();
12
13 if ( empty( $products ) ) :
14 return;
15 endif;
16
17 foreach ( $products as $key => $product ) :
18
19 $license = $helper->get_license_details( $key );
20
21 if ( is_array( $license ) ) {
22 $is_active = $license[ 'valid' ];
23 $license_key = $license[ 'license' ];
24 }
25 else {
26 $is_active = false;
27 $license_key = $license;
28 }
29
30 ?>
31 <div class="charitable-settings-object charitable-licensed-product cf">
32 <h4><?php echo $product[ 'name' ] ?></h4>
33 <input type="text" name="charitable_settings[licenses][<?php echo $key ?>]" id="charitable_settings_licenses_<?php echo $key ?>" class="charitable-settings-field" placeholder="<?php _e( 'Add your license key', 'charitable' ) ?>" value="<?php echo $license_key ?>" />
34 <?php if ( $license ) : ?>
35 <div class="license-meta">
36 <?php if ( $is_active ) : ?>
37 <a href="<?php echo $helper->get_license_deactivation_url( $key ) ?>" class="button-secondary license-deactivation"><?php _e( 'Deactivate License' ) ?></a>
38 <span class="license-expiration-date"><?php printf( '%s %s.', __( 'Expiring in', 'charitable' ), human_time_diff( strtotime( $license[ 'expiration_date' ] ), time() ) ) ?></span>
39 <?php elseif( is_array( $license ) ) : ?>
40 <span class="license-invalid"><?php _e( 'This license is not valid', 'charitable' ) ?></span>
41 <?php else : ?>
42 <span class="license-invalid"><?php _e( 'We could not validate this license', 'charitable' ) ?></span>
43 <?php endif ?>
44 </div>
45 <?php endif ?>
46 </div>
47
48 <?php
49 endforeach;