PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.3.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.3.2
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.3.2, at includes/admin/views/settings/emails.php

44 lines 1.8 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 <?php foreach ( $emails as $email ) :
16 $email = new $email;
17 $is_enabled = $helper->is_enabled_email( $email->get_email_id() );
18 $action_url = esc_url( add_query_arg( array(
19 'charitable_action' => $is_enabled ? 'disable_email' : 'enable_email',
20 'email_id' => $email->get_email_id(),
21 '_nonce' => wp_create_nonce( 'email' )
22 ), admin_url( 'admin.php?page=charitable-settings&tab=emails' ) ) );
23 ?>
24 <div class="charitable-settings-object charitable-email cf">
25 <h4><?php echo $email->get_name() ?></h4>
26 <span class="actions">
27 <?php if ( $is_enabled ) :
28 $settings_url = esc_url( add_query_arg( array(
29 'group' => 'emails_' . $email->get_email_id()
30 ), admin_url( 'admin.php?page=charitable-settings&tab=emails' ) ) );
31 ?>
32 <a href="<?php echo $settings_url ?>" class="button button-primary"><?php _e( 'Email Settings', 'charitable' ) ?></a>
33 <?php endif ?>
34 <?php if ( $is_enabled ) : ?>
35 <a href="<?php echo $action_url ?>" class="button"><?php _e( 'Disable Email', 'charitable' ) ?></a>
36 <?php else : ?>
37 <a href="<?php echo $action_url ?>" class="button"><?php _e( 'Enable Email', 'charitable' ) ?></a>
38 <?php endif ?>
39 </span>
40 </div>
41 <?php endforeach ?>
42 <?php else : ?>
43 <?php _e( 'There are no emails available in your system.', 'charitable' ) ?>
44 <?php endif ?>