Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Imagetoolbar" content="No"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php esc_html_e('Email Confirmation', 'fluent-crm') ?></title>
|
||||
<meta name="robots" content="noindex">
|
||||
<?php
|
||||
wp_head();
|
||||
do_action('fluent_crm/confirmation_head', $subscriber);
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div class="fluentcrm_unsubscribe_wrapper">
|
||||
<div class="fluentcrm_un_title">
|
||||
<?php if (!empty($business['logo'])): ?>
|
||||
<div class="fluentcrm_un_logo_wrapper">
|
||||
<img src="<?php echo esc_url($business['logo']); ?>" alt="<?php echo esc_attr($business['business_name']); ?>"/>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<h3><?php echo isset($business['business_name']) ? esc_html($business['business_name']) : ''; ?></h3>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="fluentcrm_un_form_wrapper">
|
||||
<?php echo $body; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
wp_footer();
|
||||
do_action('fluent_crm/confirmation_footer', $subscriber);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>FluentCRM</title>
|
||||
<style type="text/css">@media only screen and (max-width: 599px) {table.body .container {width: 95% !important;}.header {padding: 15px 15px 12px 15px !important;}.header img {width: 200px !important;height: auto !important;}.content, .aside {padding: 30px 40px 20px 40px !important;}}</style>
|
||||
</head>
|
||||
<body style="height: 100% !important; width: 100% !important; min-width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #f1f1f1; text-align: center;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="body" style="border-collapse: collapse; border-spacing: 0; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; height: 100% !important; width: 100% !important; min-width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; background-color: #f1f1f1; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%;">
|
||||
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
||||
<td align="center" valign="top" class="body-inner fluent-crm" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center;">
|
||||
<!-- Container -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="container" style="border-collapse: collapse; border-spacing: 0; padding: 0; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; width: 600px; margin: 0 auto 30px auto; Margin: 0 auto 30px auto; text-align: inherit;">
|
||||
<?php if(!empty($business) && !empty($business['business_name'])): ?>
|
||||
<!-- Header -->
|
||||
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
||||
<td align="center" valign="middle" class="header" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center; padding: 30px 30px 22px 30px;">
|
||||
<h3><?php echo esc_html($business['business_name']); ?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<!-- Content -->
|
||||
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
||||
<td align="left" valign="top" class="content" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #ffffff; padding: 60px 75px 45px 75px; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 1px solid #ddd; border-top: 4px solid #c716c1;">
|
||||
<div class="success" style="text-align: left;">
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
Hello <?php echo esc_html($subscriber->first_name); ?>,<br />
|
||||
We received a request for your email subscription preferences.
|
||||
</p>
|
||||
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
To ensure that we fulfill your request, we're sending this confirmation email with an email management link. Please click the link below to manage your email subscription preferences:
|
||||
</p>
|
||||
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
<a style="font-weight: bold;" href="<?php echo esc_url($manage_subscription_url); ?>">View Your Email Preferences</a>
|
||||
</p>
|
||||
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
If you did not make this request, it was probably submitted by someone else by mistake. You can ignore this email, and no changes will be made to your subscription preferences.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Imagetoolbar" content="No"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php esc_html_e('Update your preferences', 'fluent-crm') ?></title>
|
||||
<meta name="robots" content="noindex">
|
||||
<?php
|
||||
wp_head();
|
||||
do_action('fluent_crm/manage_subscription_head', $subscriber);
|
||||
?>
|
||||
</head>
|
||||
<body class="fc_unsub">
|
||||
<div class="fluentcrm_unsubscribe_wrapper">
|
||||
<div class="fluentcrm_un_title">
|
||||
<?php if (!empty($business['logo'])): ?>
|
||||
<div class="fluentcrm_un_logo_wrapper">
|
||||
<img src="<?php echo esc_url($business['logo']); ?>" alt="<?php echo esc_attr($business['business_name']); ?>"/>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<h3><?php echo esc_html($business['business_name']); ?></h3>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="fluentcrm_un_form_wrapper">
|
||||
<h3><?php esc_html_e('Update your preferences', 'fluent-crm'); ?></h3>
|
||||
<?php require_once FLUENTCRM_PLUGIN_PATH.'app/Views/external/manage_subscription_form.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
wp_footer();
|
||||
do_action('fluent_crm/manage_subscription_footer', $subscriber);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<div class="fc_manage_sub_form">
|
||||
<form id="fluentcrm_preferences_form" class="fluentcrm_public_pref_form fc_public_form">
|
||||
<input type="hidden" name="_abs_email" value="<?php echo esc_html($abs_email); ?>"/>
|
||||
<input type="hidden" name="_abs_hash" value="<?php echo esc_html($abs_hash); ?>"/>
|
||||
<input type="hidden" name="_original_hash" value="<?php echo esc_html($subscriber->hash); ?>"/>
|
||||
<input type="hidden" name="action" value="fluentcrm_manage_preferences_ajax"/>
|
||||
<input type="hidden" name="_secure_hash" value="<?php echo esc_html($secure_hash); ?>"/>
|
||||
<div class="fc_field">
|
||||
<label for="fc_email"><?php esc_html_e('Your Email Address', 'fluent-crm'); ?></label>
|
||||
<input id="fc_email" required value="<?php echo esc_html($abs_email); ?>" placeholder="Your Email Address"
|
||||
class="fc_input_control" type="text" name="email"/>
|
||||
</div>
|
||||
<div class="fc_field">
|
||||
<label for="fc_first_name"><?php esc_html_e('First Name', 'fluent-crm'); ?></label>
|
||||
<input id="fc_first_name" required value="<?php echo esc_html($subscriber->first_name); ?>"
|
||||
placeholder="<?php esc_html_e('First Name', 'fluent-crm'); ?>" class="fc_input_control" type="text"
|
||||
name="first_name"/>
|
||||
</div>
|
||||
<div class="fc_field">
|
||||
<label for="fc_last_name"><?php esc_html_e('Last Name', 'fluent-crm'); ?></label>
|
||||
<input id="fc_last_name" required value="<?php echo esc_html($subscriber->last_name); ?>" placeholder="<?php esc_html_e('Last Name', 'fluent-crm'); ?>" class="fc_input_control" type="text" name="last_name"/>
|
||||
</div>
|
||||
|
||||
<?php if ($list_options): ?>
|
||||
<div class="fc_field">
|
||||
<h4 class="mainling_list_group_title"><?php esc_html_e('Mailing List Groups', 'fluent-crm') ?></h4>
|
||||
<?php foreach ($list_options as $list_option): ?>
|
||||
<label class="fc_list_items">
|
||||
<input <?php echo ($list_option['selected']) ? 'checked' : ''; ?> type="checkbox" name="lists[]" value="<?php echo esc_attr($list_option['id']); ?>"/> <?php echo esc_html($list_option['label']); ?>
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="fc_field">
|
||||
<input id="fluentcrm_preferences_submit" type="submit" value="<?php esc_html_e('Update Profile', 'fluent-crm'); ?>"></input>
|
||||
</div>
|
||||
<?php if (apply_filters('fluent_crm/show_unsubscribe_on_pref', false)): ?>
|
||||
<div class="fc_field">
|
||||
<?php esc_html_e('or', 'fluent-crm'); ?> <a id="pref_unsubscribe" href="#"><?php esc_html_e('Unsubscribe', 'fluent-crm'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
<div class="fluentcrm_form_responses"></div>
|
||||
</div>
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* @var array $business
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Imagetoolbar" content="No"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php esc_html_e('Request Manage Subscription', 'fluent-crm') ?></title>
|
||||
<meta name="robots" content="noindex">
|
||||
<?php
|
||||
wp_head();
|
||||
do_action('fluent_crm/manage_sub_request_head');
|
||||
?>
|
||||
</head>
|
||||
<body class="fc_unsub">
|
||||
<div class="fluentcrm_unsubscribe_wrapper">
|
||||
<div class="fluentcrm_un_title">
|
||||
<?php if (!empty($business['logo'])): ?>
|
||||
<div class="fluentcrm_un_logo_wrapper">
|
||||
<img src="<?php echo esc_url($business['logo']); ?>" alt="<?php echo (isset($business['business_name'])) ? esc_html($business['business_name']) : ''; ?>"/>
|
||||
</div>
|
||||
<?php elseif(!empty($business['business_name'])): ?>
|
||||
<h3><?php echo esc_html($business['business_name']); ?></h3>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="fluentcrm_un_form_wrapper">
|
||||
<h4><?php esc_html_e('Get Email Subscription Management Link', 'fluent-crm') ?></h4>
|
||||
<p><?php esc_html_e('Looks like we could not determine your info. Please fill out the form and get your email subscription management link via email.', 'fluent-crm'); ?></p>
|
||||
|
||||
<form method="POST" class="fluentcrm_public_pref_form fc_public_form" action="/" id="fc_unsub_req_form">
|
||||
<input type="hidden" name="action" value="fluentcrm_request_manage_subscription_ajax"/>
|
||||
<div class="fc_field">
|
||||
<label for="fc_email"><?php esc_html_e('Your Email Address', 'fluent-crm'); ?></label>
|
||||
<input id="fc_email" required placeholder="Your Email Address"
|
||||
class="fc_input_control" type="text" name="email"/>
|
||||
</div>
|
||||
<div class="fc_field">
|
||||
<input id="fluentcrm_preferences_submit" type="submit" value="<?php esc_html_e('Email me the link', 'fluent-crm'); ?>"></input>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="fluentcrm_form_responses"></div>
|
||||
</div>
|
||||
<?php do_action('fluent_crm/after_manage_sub_request_content'); ?>
|
||||
</div>
|
||||
<?php
|
||||
wp_footer();
|
||||
do_action('fluent_crm/manage_sub_request_footer');
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="fc_pref_form_wrap">
|
||||
<form method="POST" id="fc_pref_form" class="fc_public_form fc_contact_data_form">
|
||||
<?php wp_nonce_field( 'fluent_crm_account_form_fields', '_fc_nonce' ); ?>
|
||||
<?php do_action('fluent_crm/before_pref_form', $subscriber, $fields); ?>
|
||||
<?php (new \FluentCrm\App\Services\Html\FormElementBuilder)->renderFields($fields, true); ?>
|
||||
<?php do_action('fluent_crm/after_pref_form_fields', $subscriber, $fields); ?>
|
||||
<?php (new \FluentCrm\App\Services\Html\FormElementBuilder)->renderButton($submitBtn); ?>
|
||||
</form>
|
||||
<?php do_action('fluent_crm/after_pref_form', $subscriber, $fields); ?>
|
||||
<div class="fluentcrm_form_responses"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/*
|
||||
* @var \FluentCrm\App\Models\Subscriber $subscriber
|
||||
* @var \FluentCrm\App\Models\CampaignEmail $campaign_email
|
||||
* @var array $texts
|
||||
* @var array $business
|
||||
* @var string $combined_hash
|
||||
* @var array $reasons
|
||||
* @var string $secure_hash
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Imagetoolbar" content="No"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php esc_html_e('Unsubscribe', 'fluent-crm') ?></title>
|
||||
<meta name="robots" content="noindex">
|
||||
<?php
|
||||
wp_head();
|
||||
do_action('fluent_crm/unsubscribe_head', $subscriber, $campaign_email);
|
||||
?>
|
||||
</head>
|
||||
<body class="fc_unsub">
|
||||
<div class="fluentcrm_unsubscribe_wrapper">
|
||||
<?php do_action('fluent_crm/before_unsubscribe_content', $subscriber, $campaign_email); ?>
|
||||
<div class="fluentcrm_un_title">
|
||||
<?php if (!empty($business['logo'])): ?>
|
||||
<div class="fluentcrm_un_logo_wrapper">
|
||||
<img src="<?php echo esc_url($business['logo']); ?>" alt="<?php echo (isset($business['business_name'])) ? esc_html($business['business_name']) : ''; ?>"/>
|
||||
</div>
|
||||
<?php elseif(!empty($business['business_name'])): ?>
|
||||
<h3><?php echo esc_html($business['business_name']); ?></h3>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="fluentcrm_un_form_wrapper">
|
||||
<?php $wrapperClass = '';
|
||||
if ($one_click_unsubscribe == 'yes') {
|
||||
$wrapperClass = 'hide_wrap';
|
||||
?>
|
||||
<div class="fluentcrm_success">
|
||||
<?php echo esc_html__("You’ve successfully unsubscribed from our email list.", 'fluent-crm'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="fluentcrm_un_form_wrapper_inner <?php echo esc_attr($wrapperClass); ?>">
|
||||
<h3><?php echo esc_html($texts['heading']); ?></h3>
|
||||
<p><?php echo esc_html($texts['heading_description']); ?></p>
|
||||
<?php do_action('fluent_crm/before_unsubscribe_form', $subscriber, $campaign_email); ?>
|
||||
<form id="fluentcrm_unsubscribe_form" class="fluentcrm_public_pref_form">
|
||||
<input type="hidden" name="_e_id" value="<?php echo esc_attr($campaign_email->id); ?>" />
|
||||
<input type="hidden" name="action" value="fluentcrm_unsubscribe_ajax" />
|
||||
<input type="hidden" name="combined_hash" value="<?php echo esc_attr($combined_hash); ?>" />
|
||||
<input type="hidden" name="sub_hash" value="<?php echo esc_attr($subscriber->hash); ?>" />
|
||||
<input type="hidden" name="secure_hash" value="<?php echo esc_attr($secure_hash); ?>" />
|
||||
<div class="fluentcrm_form_item">
|
||||
<label><?php echo esc_html($texts['email_label']); ?></label>
|
||||
<input readonly="true" value="<?php echo esc_html($mask_email); ?>" class="fluentcrm_form_control" type="text" name="email_address" />
|
||||
</div>
|
||||
<?php if($reasons): ?>
|
||||
<div class="fluentcrm_form_item">
|
||||
<label><?php echo esc_html($texts['reason_label']); ?></label>
|
||||
<div class="fluentcrm_radio_group">
|
||||
<?php foreach ($reasons as $reasonKey => $reason): ?>
|
||||
<label>
|
||||
<input type="radio" name="reason" value="<?php echo esc_attr($reasonKey); ?>"></input> <?php echo esc_html($reason); ?>
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none;" id="fluentcrm_other_reason_wrapper" class="fluentcrm_form_item">
|
||||
<input placeholder="<?php esc_html_e('Please specify', 'fluent-crm'); ?>" class="fluentcrm_form_control" type="text" name="other_reason" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php do_action('fluent_crm/before_unsubscribe_submit', $subscriber, $campaign_email); ?>
|
||||
<div class="fluentcrm_form_item">
|
||||
<input id="fluentcrm_unsubscribe_submit" type="submit" value="<?php echo esc_html($texts['button_text']); ?>"></input>
|
||||
</div>
|
||||
</form>
|
||||
<div class="fluentcrm_form_responses"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('fluent_crm/after_unsubscribe_content', $subscriber, $campaign_email); ?>
|
||||
</div>
|
||||
<?php
|
||||
wp_footer();
|
||||
do_action('fluent_crm/unsubscribe_footer', $subscriber, $campaign_email);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>FluentCRM</title>
|
||||
<style type="text/css">@media only screen and (max-width: 599px) {table.body .container {width: 95% !important;}.header {padding: 15px 15px 12px 15px !important;}.header img {width: 200px !important;height: auto !important;}.content, .aside {padding: 30px 40px 20px 40px !important;}}</style>
|
||||
<?php
|
||||
do_action('fluent_crm/unsubscribe_request_email_head');
|
||||
?>
|
||||
</head>
|
||||
<body style="height: 100% !important; width: 100% !important; min-width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #f1f1f1; text-align: center;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="body" style="border-collapse: collapse; border-spacing: 0; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; height: 100% !important; width: 100% !important; min-width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; background-color: #f1f1f1; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%;">
|
||||
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
||||
<td align="center" valign="top" class="body-inner fluent-crm" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center;">
|
||||
<!-- Container -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="container" style="border-collapse: collapse; border-spacing: 0; padding: 0; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; width: 600px; margin: 0 auto 30px auto; Margin: 0 auto 30px auto; text-align: inherit;">
|
||||
<?php if(!empty($business) && !empty($business['business_name'])): ?>
|
||||
<!-- Header -->
|
||||
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
||||
<td align="center" valign="middle" class="header" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; text-align: center; padding: 30px 30px 22px 30px;">
|
||||
<h3><?php echo esc_html($business['business_name']); ?></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<!-- Content -->
|
||||
<tr style="padding: 0; vertical-align: top; text-align: left;">
|
||||
<td align="left" valign="top" class="content" style="word-wrap: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; vertical-align: top; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; margin: 0; Margin: 0; text-align: left; font-size: 14px; mso-line-height-rule: exactly; line-height: 140%; background-color: #ffffff; padding: 60px 75px 45px 75px; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; border-left: 1px solid #ddd; border-top: 4px solid #c716c1;">
|
||||
<div class="success" style="text-align: left;">
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
Hello <?php echo esc_html($subscriber->first_name); ?>,<br />
|
||||
We received a request to unsubscribe from our emails, and we're sorry to see you go.
|
||||
</p>
|
||||
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
To ensure that we fulfill your request, we're sending this confirmation email with an unsubscribe link. Please click the link below to confirm your request and unsubscribe from our mailing list:
|
||||
</p>
|
||||
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
<a style="font-weight: bold;" href="<?php echo esc_url($unsubscribe_url); ?>">Unsubscribe</a>
|
||||
</p>
|
||||
|
||||
<p style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #444; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-weight: normal; padding: 0; text-align: left; mso-line-height-rule: exactly; line-height: 140%; margin: 0 0 15px 0; Margin: 0 0 15px 0; font-size: 16px;">
|
||||
If you did not make this request, it was probably submitted by someone else by mistake. You can ignore this email, and no changes will be made to your subscription preferences.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/*
|
||||
* @var array $business
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Imagetoolbar" content="No"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php esc_html_e('Request Unsubscribe', 'fluent-crm') ?></title>
|
||||
<meta name="robots" content="noindex">
|
||||
<?php
|
||||
wp_head();
|
||||
do_action('fluent_crm/unsubscribe_request_head');
|
||||
?>
|
||||
</head>
|
||||
<body class="fc_unsub">
|
||||
<div class="fluentcrm_unsubscribe_wrapper">
|
||||
<div class="fluentcrm_un_title">
|
||||
<?php if (!empty($business['logo'])): ?>
|
||||
<div class="fluentcrm_un_logo_wrapper">
|
||||
<img src="<?php echo esc_url($business['logo']); ?>" alt="<?php echo (isset($business['business_name'])) ? esc_html($business['business_name']) : ''; ?>"/>
|
||||
</div>
|
||||
<?php elseif(!empty($business['business_name'])): ?>
|
||||
<h3><?php echo esc_html($business['business_name']); ?></h3>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="fluentcrm_un_form_wrapper">
|
||||
<h4><?php esc_html_e('Get Unsubscribe Link', 'fluent-crm') ?></h4>
|
||||
<p><?php esc_html_e('Looks like we could not determine your info. Please fill out the form and get an unsubscribe link via email.', 'fluent-crm'); ?></p>
|
||||
|
||||
<form method="POST" class="fluentcrm_public_pref_form fc_public_form" action="/" id="fc_unsub_req_form">
|
||||
<input type="hidden" name="action" value="fluentcrm_request_unsubscribe_ajax"/>
|
||||
<div class="fc_field">
|
||||
<label for="fc_email"><?php esc_html_e('Your Email Address', 'fluent-crm'); ?></label>
|
||||
<input id="fc_email" required placeholder="Your Email Address"
|
||||
class="fc_input_control" type="text" name="email"/>
|
||||
</div>
|
||||
<div class="fc_field">
|
||||
<input id="fluentcrm_preferences_submit" type="submit" value="<?php esc_html_e('Email me the link', 'fluent-crm'); ?>"></input>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="fluentcrm_form_responses"></div>
|
||||
</div>
|
||||
<?php do_action('fluent_crm/after_unsubscribe_request_content'); ?>
|
||||
</div>
|
||||
<?php
|
||||
wp_footer();
|
||||
do_action('fluent_crm/unsubscribe_request_footer');
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/*
|
||||
* @var array $business
|
||||
* @var string $email_heading
|
||||
* @var \FluentCrm\App\Models\CampaignEmail|null $email
|
||||
* @var array|string $email_body Either ['rendered' => $html] or a plain HTML string (error states).
|
||||
* @var array $cssAssets
|
||||
*/
|
||||
|
||||
/*
|
||||
* Pass the email payload and renderer through WordPress's script loader instead
|
||||
* of emitting a hardcoded inline <script>. Both the email payload and the
|
||||
* renderer go via wp_add_inline_script (see below for why not wp_localize_script
|
||||
* for the payload), attached to the DOMPurify handle — so a site owner's
|
||||
* CSP/nonce plugin can filter the tags (the page no longer requires
|
||||
* `script-src 'unsafe-inline'`) and there's nothing to ship under assets/,
|
||||
* which the build wipes and regenerates from resources/.
|
||||
*/
|
||||
foreach ((array) $cssAssets as $cssIndex => $cssAsset) {
|
||||
// Version is already baked into the URL as a query arg, so pass null for $ver.
|
||||
wp_enqueue_style('fluentcrm_view_on_browser_' . $cssIndex, $cssAsset, [], null);
|
||||
}
|
||||
|
||||
wp_enqueue_script('fluentcrm_dompurify', fluentCrmMix('libs/purify/purify.min.js'), [], FLUENTCRM_PLUGIN_VERSION, true);
|
||||
|
||||
// Normalize the body shape: callers pass either ['rendered' => $html] (success)
|
||||
// or a plain HTML string (error states). The renderer always expects `rendered`.
|
||||
if (is_array($email_body)) {
|
||||
$renderedBody = isset($email_body['rendered']) ? $email_body['rendered'] : '';
|
||||
} else {
|
||||
$renderedBody = (string) $email_body;
|
||||
}
|
||||
|
||||
// Email payload as window.fluentCrmEmail, printed BEFORE DOMPurify's tag.
|
||||
// Deliberately NOT wp_localize_script: that runs html_entity_decode() on the
|
||||
// value (WP_Scripts::localize), which would turn escaped entities in the email
|
||||
// body (e.g. `<style>`) into live HTML before DOMPurify ever sees it.
|
||||
// wp_add_inline_script preserves the payload verbatim; the JSON_HEX_* flags
|
||||
// neutralize any `</script>` breakout from the inline script context.
|
||||
$fcEmailData = wp_json_encode(
|
||||
['rendered' => $renderedBody],
|
||||
JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT
|
||||
);
|
||||
wp_add_inline_script('fluentcrm_dompurify', 'window.fluentCrmEmail = ' . $fcEmailData . ';', 'before');
|
||||
|
||||
// Renderer: sanitize the email body and mount it inside a closed shadow root so
|
||||
// its styles stay isolated from (and can't leak into) the surrounding page.
|
||||
// Runs after DOMPurify loads (default 'after' position).
|
||||
$fcViewOnBrowserScript = <<<'JS'
|
||||
(function () {
|
||||
var data = window.fluentCrmEmail;
|
||||
if (!data || !data.rendered) {
|
||||
return;
|
||||
}
|
||||
var host = document.getElementById('fluent_email_body');
|
||||
if (!host || typeof host.attachShadow !== 'function' || typeof window.DOMPurify === 'undefined') {
|
||||
return;
|
||||
}
|
||||
var clean = window.DOMPurify.sanitize(data.rendered, { ADD_TAGS: ['style'], ADD_ATTR: ['target'] });
|
||||
var shadow = host.attachShadow({ mode: 'closed' });
|
||||
var wrapper = document.createElement('div');
|
||||
wrapper.innerHTML = clean;
|
||||
shadow.appendChild(wrapper);
|
||||
})();
|
||||
JS;
|
||||
|
||||
wp_add_inline_script('fluentcrm_dompurify', $fcViewOnBrowserScript);
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="Imagetoolbar" content="No"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex">
|
||||
<title><?php echo esc_attr($email_heading); ?></title>
|
||||
<?php
|
||||
wp_head();
|
||||
$email && do_action('fluent_crm/view_on_browser_head', $email);
|
||||
?>
|
||||
</head>
|
||||
<body class="fluentcrm_web_body">
|
||||
<div class="fluentcrm_web_view_wrapper">
|
||||
<?php $email && do_action('fluent_crm/view_on_browser_before_heading', $email); ?>
|
||||
|
||||
<div class="fluentcrm_web_view_header">
|
||||
<div class="fluentcrm_web_logo">
|
||||
<?php if (!empty($business['logo'])): ?>
|
||||
<a href="<?php echo esc_url(site_url()); ?>">
|
||||
<img src="<?php echo esc_url($business['logo']); ?>"
|
||||
alt="<?php echo esc_html($business['business_name']); ?>"/>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="fluentcrm_web_heading">
|
||||
<h1><?php echo wp_kses_post($email_heading); ?></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $email && do_action('fluent_crm/view_on_browser_before_email_body', $email); ?>
|
||||
|
||||
<div class="fluentcrm_email_wrapper">
|
||||
<div id="fluent_email_body"></div>
|
||||
</div>
|
||||
|
||||
<?php $email && do_action('fluent_crm/view_on_browser_after_email_body', $email); ?>
|
||||
</div>
|
||||
<?php $email && do_action('fluent_crm/view_on_browser_footer', $email); ?>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user