PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.4.9
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.4.9
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 / emails.php

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

51 lines 1.6 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 emails.
4 *
5 * @author Studio 164a
6 * @package Charitable/Admin View/Settings
7 * @since 1.0.0
8 */
9
10 $helper = charitable_get_helper( 'emails' );
11 $emails = $helper->get_available_emails();
12
13 if ( count( $emails ) ) :
14
15 foreach ( $emails as $email ) :
16
17 $email = new $email;
18 $is_enabled = $helper->is_enabled_email( $email->get_email_id() );
19 $action_url = esc_url( add_query_arg( array(
20 'charitable_action' => $is_enabled ? 'disable_email' : 'enable_email',
21 'email_id' => $email->get_email_id(),
22 '_nonce' => wp_create_nonce( 'email' ),
23 ), admin_url( 'admin.php?page=charitable-settings&tab=emails' ) ) );
24
25 ?>
26 <div class="charitable-settings-object charitable-email cf">
27 <h4><?php echo $email->get_name() ?></h4>
28 <span class="actions">
29 <?php if ( $is_enabled ) :
30 $settings_url = esc_url( add_query_arg( array(
31 'group' => 'emails_' . $email->get_email_id(),
32 ), admin_url( 'admin.php?page=charitable-settings&tab=emails' ) ) );
33 ?>
34 <a href="<?php echo $settings_url ?>" class="button button-primary"><?php _e( 'Email Settings', 'charitable' ) ?></a>
35 <?php endif ?>
36 <?php if ( ! $email->is_required() ) : ?>
37 <?php if ( $is_enabled ) : ?>
38 <a href="<?php echo $action_url ?>" class="button"><?php _e( 'Disable Email', 'charitable' ) ?></a>
39 <?php else : ?>
40 <a href="<?php echo $action_url ?>" class="button"><?php _e( 'Enable Email', 'charitable' ) ?></a>
41 <?php endif ?>
42 <?php endif ?>
43 </span>
44 </div>
45 <?php endforeach ?>
46 <?php else :
47
48 _e( 'There are no emails available in your system.', 'charitable' );
49
50 endif;
51