| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $current_user, $wppmfunction, $wpdb; |
| 7 |
if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
$wppm_email_notificatins = get_option('wppm_email_notification'); |
| 11 |
$notification_types = $wppmfunction->get_email_notification_types(); |
| 12 |
?> |
| 13 |
<span class="wppm-title"> |
| 14 |
<?php echo esc_html_e('Email Notifications','taskbuilder');?> |
| 15 |
</span> |
| 16 |
<div class="wppm_padding_space"></div> |
| 17 |
<table class="table table-striped table-hover wppm_email_notification_table"> |
| 18 |
<tr> |
| 19 |
<th><?php echo esc_html_e('Notification Type','taskbuilder')?></th> |
| 20 |
<th><?php echo esc_html_e('Actions','taskbuilder')?></th> |
| 21 |
</tr> |
| 22 |
<?php foreach ( $wppm_email_notificatins as $key=>$email_template ) : |
| 23 |
$type = $email_template['type']; |
| 24 |
$type = isset($notification_types[$type]) ? $notification_types[$type] : ''; |
| 25 |
?> |
| 26 |
<tr> |
| 27 |
<td><?php echo (esc_attr($type))?></td> |
| 28 |
<td> |
| 29 |
<div class="wppm_flex"> |
| 30 |
<div onclick="wppm_get_edit_email_notification(<?php echo esc_js($key)?>);" style="cursor:pointer;"><span><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/edit_01.svg'); ?>" alt="edit"></span></div> |
| 31 |
</div> |
| 32 |
</td> |
| 33 |
</tr> |
| 34 |
<?php endforeach;?> |
| 35 |
</table> |