first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
<?php
$allowed_html_tags = ig_es_allowed_html_tags_in_esc();
?>
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $total_hard_bounced_contacts ); ?>
</span>
<div class="inline-block es-tooltip relative align-middle cursor-pointer text-left">
<?php
if ( 0 !== $bounces_percentage_growth ) {
if ( $bounces_percentage_growth > 0 ) {
$text_color_class = 'text-red-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>';
} else {
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>';
$text_color_class = 'text-green-600';
}
?>
<span class="text-sm mr-0.5 <?php echo esc_attr( $text_color_class ); ?>">
<?php echo esc_html( $bounces_percentage_growth ); ?>%
<?php echo wp_kses( $arraw_html, $allowed_html_tags ); ?>
</span>
<?php
}
?>
<span class="break-words invisible h-auto lg:w-48 xl:w-64 tracking-wide absolute z-70 tooltip-text bg-black text-gray-300 text-xs rounded p-3 py-2">
<div class="text-white-100">
<div>
<span class="text-lg text-base">
<?php echo esc_html__( 'Hard bounces', 'email-subscribers' ); ?>:
<?php echo esc_html( $bounces_before_two_months ); ?>
</span>
</div>
</div>
<div class="text-xs mt-1 pt-1 text-gray-100 border-t border-gray-100">
<?php
/* translators: 1. Start date 2. End date */
echo esc_html__( sprintf( '%1$s to %2$s', $last_period_start_date, $last_period_end_date ), 'email-subscribers' );
?>
</div>
<svg class="tooltip-arrow absolute mt-2 text-black text-opacity-100 h-2.5 left-0" viewBox="0 0 255 255">
<polygon class="fill-current" points="0,0 127.5,127.5 255,0"></polygon>
</svg>
</span>
</div>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Bounced', 'email-subscribers' ); ?>
<?php
if ( ! empty( $upsell ) ) {
$utm_args = array(
'utm_medium' => 'dashboard-bounce-stat',
'url' => 'https://www.icegram.com/documentation/how-to-handle-bounced-email-addresses-in-email-subscribers/'
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block max"></span>
</a>
<?php
}
?>
</p>

View File

@@ -0,0 +1,459 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $wpdb;
$audience_url = admin_url( 'admin.php?page=es_subscribers' );
$new_contact_url = admin_url( 'admin.php?page=es_subscribers&action=new' );
// $new_broadcast_url = admin_url( 'admin.php?page=es_gallery&campaign-type=newsletter' );
$new_broadcast_url = admin_url( 'admin.php?page=es_campaigns#!/gallery?campaignType=newsletter' );
// $new_post_notification_url = admin_url( 'admin.php?page=es_gallery&campaign-type=post_notification' );
$new_post_notification_url = admin_url( 'admin.php?page=es_campaigns#!/gallery?campaignType=post_notification' );
$new_sequence_url = admin_url( 'admin.php?page=es_sequence&action=new' );
$new_form_url = admin_url( 'admin.php?page=es_forms&action=new' );
$new_list_url = admin_url( 'admin.php?page=es_lists&action=new' );
$new_template_url = admin_url( 'admin.php?page=es_gallery&manage-templates=yes' );
$icegram_pricing_url = 'https://www.icegram.com/email-subscribers-pricing/';
$reports_url = admin_url( 'admin.php?page=es_reports' );
$templates_url = admin_url( 'edit.php?post_type=es_template' );
$settings_url = admin_url( 'admin.php?page=es_settings' );
$facebook_url = 'https://www.facebook.com/groups/2298909487017349/';
$feature_blocks = array(
'form' => array(
'title' => __( 'Add a Subscription Form', 'email-subscribers' ),
'desc' => __( 'Grow subscribers. Add a newsletter signup form to your site.', 'email-subscribers' ),
'cta_text' => __( 'Create', 'email-subscribers' ),
'feature_url' => $new_form_url,
'graphics_img' => 'lite/admin/images/dashboard-subscriber-form.png',
),
'import_contacts' => array(
'title' => __( 'Import Contacts', 'email-subscribers' ),
'desc' => __( 'Coming from another email marketing system? Upload a CSV file to import subscribers.', 'email-subscribers' ),
'cta_text' => __( 'Import', 'email-subscribers' ),
'feature_url' => admin_url( 'admin.php?page=es_subscribers&action=import' ),
'graphics_img' => 'lite/admin/images/dashboard-import-contacts.png',
),
'setup_email_sending' => array(
'title' => __( 'Configure Email Sending', 'email-subscribers' ),
'desc' => __( ' Essential for high email delivery and reaching the inbox. SMTP, email service providers... set it all up.', 'email-subscribers' ),
'cta_text' => __( 'Setup', 'email-subscribers' ),
'feature_url' => admin_url( 'admin.php?page=es_settings#tabs-email_sending' ),
'graphics_img' => 'lite/admin/images/dashboard-configure-email-sending.png',
),
'broadcast' => array(
'title' => __( 'Send a Newsletter', 'email-subscribers' ),
'desc' => __( 'Broadcast a newsletter campaign to all or selected subscribers.', 'email-subscribers' ),
'cta_text' => __( 'Begin', 'email-subscribers' ),
'feature_url' => $new_broadcast_url,
'graphics_img' => 'lite/admin/images/dashboard-send-newsletter.png',
),
'autoresponder' => array(
'title' => __( 'Create an Auto-responder Sequence', 'email-subscribers' ),
'desc' => __( 'Welcome emails, drip campaigns... Send automatic emails at regular intervals to engage readers.', 'email-subscribers' ),
'cta_text' => __( 'Start', 'email-subscribers' ),
'feature_url' => $new_sequence_url,
'graphics_img' => 'lite/admin/images/dashboard-autoresponder-sequence.png',
'documentation_url' => 'https://www.icegram.com/documentation/email-sequence/?utm_source=in_app&utm_medium=sequence&utm_campaign=es_doc_upsell',
),
);
$trial_block = array();
$show_trial_optin = ! ES()->trial->is_trial() && ! ES()->is_premium();
if ( $show_trial_optin ) {
$trial_period_in_days = ES()->trial->get_trial_period( 'in_days' );
$trial_block = array(
'trial-optin' => array(
'title' => __( 'Try Icegram Express (formerly known as Email Subscribers & Newsletters) Premium', 'email-subscribers' ),
/* translators: %d: Trial period in days */
'desc' => sprintf( __( 'Start your %d days free trial to get automatic email sending, advance spam protection and more.', 'email-subscribers' ), $trial_period_in_days),
'cta_text' => __( 'Start trial', 'email-subscribers' ),
'feature_url' => '#',
),
);
} elseif ( ! ES()->is_premium() && ES()->trial->is_trial() && ES()->trial->is_trial_valid() ) {
$trial_period_in_days = ES()->trial->get_trial_period( 'in_days' );
$trial_expiry_date = ES()->trial->get_trial_expiry_date();
$formatted_trial_expiry_date = ig_es_format_date_time( $trial_expiry_date );
$trial_block = array(
'trial-active' => array(
/* translators: %d: Trial period in days */
'title' => sprintf( __( 'Your free %d days trial is on', 'email-subscribers' ), $trial_period_in_days ),
/* translators: %s: Number of days remaining in trial */
'desc' => sprintf( __( 'Hope you are enjoying the premium features of Icegram Express (formerly known as Email Subscribers & Newsletters). It will expire on %s. You can anytime upgrade it to MAX.', 'email-subscribers' ), $formatted_trial_expiry_date ),
'cta_text' => __( 'Upgrade to Max', 'email-subscribers' ),
'feature_url' => 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=upsell&utm_campaign=es_upsell',
),
);
} elseif ( ! ES()->is_premium() && ES()->trial->is_trial() && ES()->trial->is_trial_expired() ) {
$trial_period_in_days = ES()->trial->get_trial_period( 'in_days' );
$trial_block = array(
'trial-expired' => array(
/* translators: %d: Trial period in days */
'title' => sprintf( __( 'Your %d days trial is expired', 'email-subscribers' ), $trial_period_in_days ),
'desc' => __( 'Upgrade now to continue uninterrupted use of premium features like automatic email sending and more.', 'email-subscribers' ),
'cta_text' => __( 'Upgrade to Max', 'email-subscribers' ),
'feature_url' => 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=upsell&utm_campaign=es_upsell',
),
);
}
$feature_blocks = array_merge( $trial_block, $feature_blocks );
$feature_blocks = apply_filters( 'ig_es_admin_dashboard_feature_blocks', $feature_blocks );
$topics = ES_Common::get_useful_articles();
$allowed_html_tags = ig_es_allowed_html_tags_in_esc();
?>
<div class="wrap pt-4 font-sans" id="ig-es-dashboard">
<header class="mx-auto max-w-7xl">
<div class="md:flex md:items-center md:justify-between">
<div class="flex-1 min-w-0">
<h2 class="text-3xl font-bold leading-7 text-gray-700 sm:leading-9 sm:truncate">
<?php echo esc_html__( 'Dashboard', 'email-subscribers' ); ?>
</h2>
</div>
<div class="flex mt-4 md:mt-0 md:ml-4">
<a href="<?php echo esc_url( $audience_url ); ?>">
<span class="rounded-md shadow-sm">
<button type="button" class="inline-flex items-center px-4 py-2 text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:shadow-outline focus:border-blue-300">
<?php echo esc_html__( 'Audience', 'email-subscribers' ); ?>
</button>
</span>
</a>
<span class="ml-3 rounded-md shadow-sm">
<div id="ig-es-create-button" class="relative inline-block text-left">
<div>
<span class="rounded-md shadow-sm">
<button type="button" class="w-full ig-es-primary-button">
<?php echo esc_html__( 'Create', 'email-subscribers' ); ?>
<svg class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/>
</svg>
</button>
</span>
</div>
<div x-show="open" id="ig-es-create-dropdown" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 hidden w-56 mt-2 origin-top-right rounded-md shadow-lg z-50">
<div class="bg-white rounded-md shadow-xs">
<div class="py-1">
<a href="<?php echo esc_url( $new_broadcast_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Broadcast', 'email-subscribers' ); ?></a>
<!-- Start-IG-Code -->
<a href="<?php echo esc_url( $new_post_notification_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Post Notification', 'email-subscribers' ); ?></a>
<!-- End-IG-Code -->
<?php if ( ES()->is_pro() ) { ?>
<a href="<?php echo esc_url( $new_sequence_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Sequence', 'email-subscribers' ); ?></a>
<?php } else { ?>
<a href="<?php echo esc_url( $icegram_pricing_url ); ?>" target="_blank" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Sequence', 'email-subscribers' ); ?>
<span class="inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full"><?php echo esc_html__( 'Premium', 'email-subscribers' ); ?></span></a>
<?php } ?>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<a href="<?php echo esc_url( $new_template_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Template', 'email-subscribers' ); ?></a>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<a href="<?php echo esc_url( $new_form_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Form', 'email-subscribers' ); ?></a>
<a href="<?php echo esc_url( $new_list_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New List', 'email-subscribers' ); ?></a>
<a href="<?php echo esc_url( $new_contact_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Contact', 'email-subscribers' ); ?></a>
</div>
</div>
</div>
</div>
</span>
</div>
</div>
</header>
<main class="mx-auto max-w-7xl">
<section id="es-dashboard-stats" class="relative py-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:grid sm:grid-cols-3">
<div class="flex-auto min-w-0 es-w-55 pl-2">
<p class="pb-3 text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php
/* translators: %s. Number of days */
echo sprintf( esc_html__( 'Subscribers activities in last %d days', 'email-subscribers' ), esc_html( $days ) );
?>
</span>
<span class="float-right">
<select id="filter_by_list">
<?php
$lists_dropdown = ES_Common::prepare_list_dropdown_options( '', __( 'All lists', 'email-subscribers' ) );
echo wp_kses( $lists_dropdown, $allowed_html_tags );
?>
</select>
</span>
</p>
<?php
ES_Admin::get_view(
'dashboard/subscribers-stats',
array(
'reports_data' => $reports_data,
'days' => $days,
)
);
?>
</div>
<div class="flex-auto min-w-0 es-w-45 px-3">
<?php
if ( ES_Service_Email_Sending::is_onboarding_completed() ) {
$current_month = ig_es_get_current_month();
$service_status = ES_Service_Email_Sending::get_sending_service_status();
$ess_data = get_option( 'ig_es_ess_data', array() );
$used_limit = isset( $ess_data['used_limit'][$current_month] ) ? $ess_data['used_limit'][$current_month]: 0;
$allocated_limit = isset( $ess_data['allocated_limit'] ) ? $ess_data['allocated_limit'] : 0;
$interval = isset( $ess_data['interval'] ) ? $ess_data['interval'] : '';
$current_mailer_name = ES()->mailer->get_current_mailer_name();
ES_Admin::get_view(
'dashboard/ess-account-overview',
array(
'service_status' => $service_status,
'allocated_limit' => $allocated_limit,
'used_limit' => $used_limit,
'interval' => $interval,
'current_mailer_name' => $current_mailer_name,
'settings_url' => $settings_url,
)
);
} else {
$ess_onboarding_step = get_option( 'ig_es_ess_onboarding_step', 1 );
$ess_optin = ig_es_get_request_data( 'ess_optin' );
ES_Admin::get_view(
'dashboard/ess-onboarding',
array(
'ess_onboarding_step' => (int) $ess_onboarding_step,
'ess_optin' => $ess_optin,
)
);
}
?>
</div>
</section>
<section id="es-sending-service" class="py-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:grid sm:grid-cols-2">
<div class="flex-auto min-w-0 es-w-35 px-2">
<?php
$countries_count = 5;
?>
<p class="text-lg font-medium leading-7 text-gray-400">
<?php
/* Translators: %s. Country count */
echo sprintf( esc_html__( 'Top %s countries', 'email-subscribers' ), esc_html( $countries_count ) );
?>
<?php
if ( ! ES()->is_pro() ) {
$utm_args = array(
'utm_medium' => 'dashboard-top-countries',
'url' => 'https://www.icegram.com/documentation/what-analytics-does-email-subscribers-track/'
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block max"></span>
</a>
<?php
}
?>
</p>
<?php
do_action( 'ig_es_show_top_countries_stats', $countries_count );
?>
</div>
<div class="flex-auto min-w-0 es-w-65 pr-2">
<p class="text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php
echo esc_html__( 'Recent activities', 'email-subscribers' );
?>
<?php
if ( ! ES()->is_pro() ) {
$utm_args = array(
'utm_medium' => 'dashboard-recent-activites',
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block max"></span>
</a>
<?php
}
?>
</span>
<?php
if ( ES()->is_pro() ) {
?>
<span class="float-right">
<?php
$activities = array(
IG_CONTACT_SUBSCRIBE => esc_html__( 'Subscribes', 'email-subscribers' ),
IG_CONTACT_UNSUBSCRIBE => esc_html__( 'Unsubscribes', 'email-subscribers' ),
IG_MESSAGE_SENT => esc_html__( 'Received', 'email-subscribers' ),
IG_MESSAGE_OPEN => esc_html__( 'Opens', 'email-subscribers' ),
IG_LINK_CLICK => esc_html__( 'Clicks', 'email-subscribers' ),
IG_MESSAGE_SOFT_BOUNCE => esc_html__( 'Soft bounces', 'email-subscribers' ),
IG_MESSAGE_HARD_BOUNCE => esc_html__( 'Hard bounces', 'email-subscribers' ),
);
?>
<select id="filter_by_activity">
<option value="">
<?php echo esc_html__( 'All activities', 'email-subscribers' ); ?>
</option>
<?php
foreach ( $activities as $activity_id => $activity ) {
?>
<option value="<?php echo esc_attr( $activity_id ); ?>"><?php echo esc_html( $activity ); ?></option>
<?php
}
?>
</select>
</span>
<?php
}
?>
</p>
<?php
do_action( 'ig_es_show_recent_activities' );
?>
</div>
</section>
<section id="es-campaign-stats" class="pt-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:grid sm:grid-cols-2">
<div class="flex-auto min-w-0 es-w-65 px-2">
<p class="px-2 text-lg font-medium leading-6 text-gray-400">
<?php
echo esc_html__( 'Recent campaigns', 'email-subscribers' );
?>
</p>
<?php
$campaigns = ! empty( $reports_data ) ? $reports_data['campaigns'] : array();
ES_Admin::get_view(
'dashboard/recent-campaigns',
array(
'campaigns' => $campaigns,
'upsell' => ! ES()->is_pro(),
)
);
?>
</div>
<div class="flex-auto min-w-0 es-w-35 pr-2">
<p class="text-lg font-medium leading-6 text-gray-400">
<span>
<?php
echo esc_html__( 'Tips & Tricks', 'email-subscribers' );
?>
</span>
</p>
<?php
ES_Admin::get_view(
'dashboard/tip-and-tricks',
array(
'topics' => $topics
)
);
?>
</div>
</section>
<section class="my-16">
<div class="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">
<?php
foreach ( $feature_blocks as $feature => $data ) {
$is_trial_block = strpos( $feature, 'trial' ) !== false;
$bg = $is_trial_block ? 'bg-teal-100' : 'bg-white';
?>
<div id="ig-es-<?php echo esc_attr( $feature ); ?>-block" class="relative p-6 rounded-lg shadow <?php echo esc_attr( $bg ); ?>">
<h3 class="text-lg font-medium tracking-tight text-gray-900">
<?php echo esc_html( $data['title'] ); ?>
</h3>
<?php
if ( ! empty( $data['graphics_img'] ) ) {
$extra_css = ! empty( $data['graphics_img_class'] ) ? $data['graphics_img_class'] : '';
?>
<img
class="absolute bottom-0 right-0 w-24 -mr-3 <?php echo esc_attr( $extra_css ); ?>"
src= "<?php echo esc_url( ES_PLUGIN_URL . $data['graphics_img'] ); ?>"
/>
<?php
}
?>
<div class="block-description" style="width: calc(100% - 4rem)">
<p class="pt-3 xl:pr-3 2xl:pr-0 text-sm text-gray-500">
<?php
if ( ! empty( $data['html_desc'] ) ) {
echo wp_kses_post( $data['html_desc'] );
} else {
echo esc_html( $data['desc'] );
}
?>
</p>
<?php
if ( !empty($data['feature_url'])) {
$feature_url = $data['feature_url'];
if ( ! ES()->is_pro() && isset( $data['documentation_url'] ) ) {
$feature_url = $data['documentation_url'];
}
?>
<a id="ig-es-<?php echo esc_attr( $feature ); ?>-cta" href="<?php echo esc_url( $feature_url ); ?>" target="_blank" class="es_primary_link">
<?php echo esc_html( $data['cta_text'] ); ?> &rarr;
</a>
<?php
}
?>
</div>
</div>
<?php
}
?>
</div>
</section>
</main>
</div>
<?php
if ( $show_trial_optin ) {
include_once 'trial-optin-form.php';
}
?>
<script type="text/javascript">
(function ($) {
$(document).ready(function () {
// When we click outside, close the dropdown
$(document).on("click", function (event) {
var $trigger = $("#ig-es-create-button");
if ($trigger !== event.target && !$trigger.has(event.target).length) {
$("#ig-es-create-dropdown").hide();
}
});
// Toggle Dropdown
$('#ig-es-create-button').click(function () {
$('#ig-es-create-dropdown').toggle();
});
});
})(jQuery);
</script>

View File

@@ -0,0 +1,434 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $wpdb;
$audience_url = admin_url( 'admin.php?page=es_subscribers' );
$new_contact_url = admin_url( 'admin.php?page=es_subscribers&action=new' );
$new_broadcast_url = admin_url( 'admin.php?page=es_campaigns#!/gallery?campaignType=newsletter' );
$new_post_notification_url = admin_url( 'admin.php?page=es_campaigns#!/gallery?campaignType=post_notification' );
$new_sequence_url = admin_url( 'admin.php?page=es_sequence&action=new' );
$new_form_url = admin_url( 'admin.php?page=es_forms&action=new' );
$new_list_url = admin_url( 'admin.php?page=es_lists&action=new' );
$new_template_url = admin_url( 'admin.php?page=es_gallery&manage-templates=yes' );
$icegram_pricing_url = 'https://www.icegram.com/email-subscribers-pricing/';
$reports_url = admin_url( 'admin.php?page=es_reports' );
$templates_url = admin_url( 'edit.php?post_type=es_template' );
$settings_url = admin_url( 'admin.php?page=es_settings' );
$facebook_url = 'https://www.facebook.com/groups/2298909487017349/';
$feature_blocks = array(
'form' => array(
'title' => __( 'Add a Subscription Form', 'email-subscribers' ),
'desc' => __( 'Grow subscribers. Add a newsletter signup form to your site.', 'email-subscribers' ),
'cta_text' => __( 'Create', 'email-subscribers' ),
'feature_url' => $new_form_url,
'graphics_img' => 'lite/admin/images/dashboard-subscriber-form.png',
),
'import_contacts' => array(
'title' => __( 'Import Contacts', 'email-subscribers' ),
'desc' => __( 'Coming from another email marketing system? Upload a CSV file to import subscribers.', 'email-subscribers' ),
'cta_text' => __( 'Import', 'email-subscribers' ),
'feature_url' => admin_url( 'admin.php?page=es_subscribers&action=import' ),
'graphics_img' => 'lite/admin/images/dashboard-import-contacts.png',
),
'setup_email_sending' => array(
'title' => __( 'Configure Email Sending', 'email-subscribers' ),
'desc' => __( ' Essential for high email delivery and reaching the inbox. SMTP, email service providers... set it all up.', 'email-subscribers' ),
'cta_text' => __( 'Setup', 'email-subscribers' ),
'feature_url' => admin_url( 'admin.php?page=es_settings#tabs-email_sending' ),
'graphics_img' => 'lite/admin/images/dashboard-configure-email-sending.png',
),
'broadcast' => array(
'title' => __( 'Send a Newsletter', 'email-subscribers' ),
'desc' => __( 'Broadcast a newsletter campaign to all or selected subscribers.', 'email-subscribers' ),
'cta_text' => __( 'Begin', 'email-subscribers' ),
'feature_url' => $new_broadcast_url,
'graphics_img' => 'lite/admin/images/dashboard-send-newsletter.png',
),
'autoresponder' => array(
'title' => __( 'Create an Auto-responder Sequence', 'email-subscribers' ),
'desc' => __( 'Welcome emails, drip campaigns... Send automatic emails at regular intervals to engage readers.', 'email-subscribers' ),
'cta_text' => __( 'Start', 'email-subscribers' ),
'feature_url' => $new_sequence_url,
'graphics_img' => 'lite/admin/images/dashboard-autoresponder-sequence.png',
'documentation_url' => 'https://www.icegram.com/documentation/email-sequence/?utm_source=in_app&utm_medium=sequence&utm_campaign=es_doc_upsell',
),
);
$trial_block = array();
$show_trial_optin = ! ES()->trial->is_trial() && ! ES()->is_premium();
if ( $show_trial_optin ) {
$trial_period_in_days = ES()->trial->get_trial_period( 'in_days' );
$trial_block = array(
'trial-optin' => array(
'title' => __( 'Try Icegram Express (formerly known as Email Subscribers & Newsletters) Premium', 'email-subscribers' ),
/* translators: %d: Trial period in days */
'desc' => sprintf( __( 'Start your %d days free trial to get automatic email sending, advance spam protection and more.', 'email-subscribers' ), $trial_period_in_days),
'cta_text' => __( 'Start trial', 'email-subscribers' ),
'feature_url' => '#',
),
);
} elseif ( ! ES()->is_premium() && ES()->trial->is_trial() && ES()->trial->is_trial_valid() ) {
$trial_period_in_days = ES()->trial->get_trial_period( 'in_days' );
$trial_expiry_date = ES()->trial->get_trial_expiry_date();
$formatted_trial_expiry_date = ig_es_format_date_time( $trial_expiry_date );
$trial_block = array(
'trial-active' => array(
/* translators: %d: Trial period in days */
'title' => sprintf( __( 'Your free %d days trial is on', 'email-subscribers' ), $trial_period_in_days ),
/* translators: %s: Number of days remaining in trial */
'desc' => sprintf( __( 'Hope you are enjoying the premium features of Icegram Express (formerly known as Email Subscribers & Newsletters). It will expire on %s. You can anytime upgrade it to MAX.', 'email-subscribers' ), $formatted_trial_expiry_date ),
'cta_text' => __( 'Upgrade to Max', 'email-subscribers' ),
'feature_url' => 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=upsell&utm_campaign=es_upsell',
),
);
} elseif ( ! ES()->is_premium() && ES()->trial->is_trial() && ES()->trial->is_trial_expired() ) {
$trial_period_in_days = ES()->trial->get_trial_period( 'in_days' );
$trial_block = array(
'trial-expired' => array(
/* translators: %d: Trial period in days */
'title' => sprintf( __( 'Your %d days trial is expired', 'email-subscribers' ), $trial_period_in_days ),
'desc' => __( 'Upgrade now to continue uninterrupted use of premium features like automatic email sending and more.', 'email-subscribers' ),
'cta_text' => __( 'Upgrade to Max', 'email-subscribers' ),
'feature_url' => 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=upsell&utm_campaign=es_upsell',
),
);
}
$feature_blocks = array_merge( $trial_block, $feature_blocks );
$feature_blocks = apply_filters( 'ig_es_admin_dashboard_feature_blocks', $feature_blocks );
$topics = ES_Common::get_useful_articles();
$allowed_html_tags = ig_es_allowed_html_tags_in_esc();
?>
<div class="wrap pt-4 font-sans" id="ig-es-container">
<header class="mx-auto max-w-7xl">
<div class="md:flex md:items-center md:justify-between">
<div class="flex-1 min-w-0">
<h2 class="text-3xl font-bold leading-7 text-gray-700 sm:leading-9 sm:truncate">
<?php echo esc_html__( 'Dashboard', 'email-subscribers' ); ?>
</h2>
</div>
<div class="flex mt-4 md:mt-0 md:ml-4">
<a href="<?php echo esc_url( $audience_url ); ?>">
<span class="rounded-md shadow-sm">
<button type="button" class="inline-flex items-center px-4 py-2 text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:shadow-outline focus:border-blue-300">
<?php echo esc_html__( 'Audience', 'email-subscribers' ); ?>
</button>
</span>
</a>
<span class="ml-3 rounded-md shadow-sm">
<div id="ig-es-create-button" class="relative inline-block text-left">
<div>
<span class="rounded-md shadow-sm">
<button type="button" class="w-full ig-es-primary-button">
<?php echo esc_html__( 'Create', 'email-subscribers' ); ?>
<svg class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/>
</svg>
</button>
</span>
</div>
<div x-show="open" id="ig-es-create-dropdown" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 hidden w-56 mt-2 origin-top-right rounded-md shadow-lg">
<div class="bg-white rounded-md shadow-xs">
<div class="py-1">
<a href="<?php echo esc_url( $new_broadcast_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Broadcast', 'email-subscribers' ); ?></a>
<!-- Start-IG-Code -->
<a href="<?php echo esc_url( $new_post_notification_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Post Notification', 'email-subscribers' ); ?></a>
<!-- End-IG-Code -->
<?php if ( ES()->is_pro() ) { ?>
<a href="<?php echo esc_url( $new_sequence_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Sequence', 'email-subscribers' ); ?></a>
<?php } else { ?>
<a href="<?php echo esc_url( $icegram_pricing_url ); ?>" target="_blank" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Sequence', 'email-subscribers' ); ?>
<span class="inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full"><?php echo esc_html__( 'Premium', 'email-subscribers' ); ?></span></a>
<?php } ?>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<a href="<?php echo esc_url( $new_template_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Template', 'email-subscribers' ); ?></a>
</div>
<div class="border-t border-gray-100"></div>
<div class="py-1">
<a href="<?php echo esc_url( $new_form_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Form', 'email-subscribers' ); ?></a>
<a href="<?php echo esc_url( $new_list_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New List', 'email-subscribers' ); ?></a>
<a href="<?php echo esc_url( $new_contact_url ); ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php echo esc_html__( 'New Contact', 'email-subscribers' ); ?></a>
</div>
</div>
</div>
</div>
</span>
</div>
</div>
</header>
<main class="mx-auto max-w-7xl">
<section id="es-dashboard-stats" class="py-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:grid sm:grid-cols-3">
<div class="flex-auto min-w-0 es-w-40 pl-2">
<p class="pb-3 text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php
/* translators: %s. Number of days */
echo sprintf( esc_html__( 'Subscribers activities in last %d days', 'email-subscribers' ), esc_html( $days ) );
?>
</span>
<span class="float-right">
<select id="filter_by_list">
<?php
$lists_dropdown = ES_Common::prepare_list_dropdown_options( '', __( 'All lists', 'email-subscribers' ) );
echo wp_kses( $lists_dropdown, $allowed_html_tags );
?>
</select>
</span>
</p>
<?php
ES_Admin::get_view(
'dashboard/subscribers-stats',
array(
'reports_data' => $reports_data,
'days' => $days,
)
);
?>
<?php
$campaign_args = array(
'include_types' => array(
'sequence_message'
)
);
$sequence_messages = ES()->campaigns_db->get_campaigns( $campaign_args );
ES_Admin::get_view(
'dashboard/sequence',
array(
'sequence_messages' => $sequence_messages,
'upsell' => ! ES()->is_pro()
)
);
?>
</div>
<div class="flex-auto min-w-0 es-w-25 px-3">
<?php
$countries_count = 5;
?>
<p class="px-3 text-lg font-medium leading-7 text-gray-400">
<?php
/* Translators: %s. Country count */
echo sprintf( esc_html__( 'Top %s countries', 'email-subscribers' ), esc_html( $countries_count ) );
?>
<?php
if ( ! ES()->is_pro() ) {
$utm_args = array(
'utm_medium' => 'dashboard-top-countries',
'url' => 'https://www.icegram.com/documentation/what-analytics-does-email-subscribers-track/'
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block"></span>
</a>
<?php
}
?>
</p>
<?php
do_action( 'ig_es_show_top_countries_stats', $countries_count );
?>
</div>
<div class="flex-auto min-w-0 es-w-35 pr-2">
<p class="text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php
echo esc_html__( 'Recent activities', 'email-subscribers' );
?>
<?php
if ( ! ES()->is_pro() ) {
$utm_args = array(
'utm_medium' => 'dashboard-recent-activites',
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block"></span>
</a>
<?php
}
?>
</span>
<?php
if ( ES()->is_pro() ) {
?>
<span class="float-right">
<?php
$activities = array(
IG_CONTACT_SUBSCRIBE => esc_html__( 'Subscribes', 'email-subscribers' ),
IG_CONTACT_UNSUBSCRIBE => esc_html__( 'Unsubscribes', 'email-subscribers' ),
IG_MESSAGE_SENT => esc_html__( 'Received', 'email-subscribers' ),
IG_MESSAGE_OPEN => esc_html__( 'Opens', 'email-subscribers' ),
IG_LINK_CLICK => esc_html__( 'Clicks', 'email-subscribers' ),
IG_MESSAGE_SOFT_BOUNCE => esc_html__( 'Soft bounces', 'email-subscribers' ),
IG_MESSAGE_HARD_BOUNCE => esc_html__( 'Hard bounces', 'email-subscribers' ),
);
?>
<select id="filter_by_activity">
<option value="">
<?php echo esc_html__( 'All activities', 'email-subscribers' ); ?>
</option>
<?php
foreach ( $activities as $activity_id => $activity ) {
?>
<option value="<?php echo esc_attr( $activity_id ); ?>"><?php echo esc_html( $activity ); ?></option>
<?php
}
?>
</select>
</span>
<?php
}
?>
</p>
<?php
do_action( 'ig_es_show_recent_activities' );
?>
</div>
</section>
<section id="es-campaign-stats" class="py-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:grid sm:grid-cols-2">
<div class="flex-auto min-w-0 es-w-65 pr-3">
<p class="px-2 text-lg font-medium leading-6 text-gray-400">
<?php
echo esc_html__( 'Recent campaigns', 'email-subscribers' );
?>
</p>
<?php
$campaigns = ! empty( $reports_data ) ? $reports_data['campaigns'] : array();
ES_Admin::get_view(
'dashboard/recent-campaigns',
array(
'campaigns' => $campaigns,
'upsell' => ! ES()->is_pro(),
)
);
?>
</div>
<div class="flex-auto min-w-0 es-w-35 pr-2">
<p class="text-lg font-medium leading-6 text-gray-400">
<span>
<?php
echo esc_html__( 'Tips & Tricks', 'email-subscribers' );
?>
</span>
</p>
<?php
ES_Admin::get_view(
'dashboard/tip-and-tricks',
array(
'topics' => $topics
)
);
?>
</div>
</section>
<section class="my-16">
<div class="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">
<?php
foreach ( $feature_blocks as $feature => $data ) {
$is_trial_block = strpos( $feature, 'trial' ) !== false;
$bg = $is_trial_block ? 'bg-teal-100' : 'bg-white';
?>
<div id="ig-es-<?php echo esc_attr( $feature ); ?>-block" class="relative p-6 rounded-lg shadow <?php echo esc_attr( $bg ); ?>">
<h3 class="text-lg font-medium tracking-tight text-gray-900">
<?php echo esc_html( $data['title'] ); ?>
</h3>
<?php
if ( ! empty( $data['graphics_img'] ) ) {
$extra_css = ! empty( $data['graphics_img_class'] ) ? $data['graphics_img_class'] : '';
?>
<img
class="absolute bottom-0 right-0 w-24 -mr-3 <?php echo esc_attr( $extra_css ); ?>"
src= "<?php echo esc_url( ES_PLUGIN_URL . $data['graphics_img'] ); ?>"
/>
<?php
}
?>
<div class="block-description" style="width: calc(100% - 4rem)">
<p class="pt-3 xl:pr-3 2xl:pr-0 text-sm text-gray-500">
<?php
if ( ! empty( $data['html_desc'] ) ) {
echo wp_kses_post( $data['html_desc'] );
} else {
echo esc_html( $data['desc'] );
}
?>
</p>
<?php
if ( !empty($data['feature_url'])) {
$feature_url = $data['feature_url'];
if ( ! ES()->is_pro() && isset( $data['documentation_url'] ) ) {
$feature_url = $data['documentation_url'];
}
?>
<a id="ig-es-<?php echo esc_attr( $feature ); ?>-cta" href="<?php echo esc_url( $feature_url ); ?>" target="_blank" class="es_primary_link">
<?php echo esc_html( $data['cta_text'] ); ?> &rarr;
</a>
<?php
}
?>
</div>
</div>
<?php
}
?>
</div>
</section>
</main>
</div>
<?php
if ( $show_trial_optin ) {
include_once 'trial-optin-form.php';
}
?>
<script type="text/javascript">
(function ($) {
$(document).ready(function () {
// When we click outside, close the dropdown
$(document).on("click", function (event) {
var $trigger = $("#ig-es-create-button");
if ($trigger !== event.target && !$trigger.has(event.target).length) {
$("#ig-es-create-dropdown").hide();
}
});
// Toggle Dropdown
$('#ig-es-create-button').click(function () {
$('#ig-es-create-dropdown').toggle();
});
});
})(jQuery);
</script>

View File

@@ -0,0 +1,68 @@
<div id="ig-ess-account-overview-block" class="relative pr-6 pl-6 w-full">
<p class="pb-3 text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php
echo esc_html__( 'Email Sending Service status', 'email-subscribers' );
?>
</span>
<?php
if ( 'success' === $service_status ) {
?>
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block ml-1 h-5 w-5 text-green-400" fill="currentColor" viewBox="0 0 20 20">
<title><?php echo esc_attr__( 'Email Sending Service working fine', 'email-subscribers' ); ?></title>
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
</svg>
<?php
} else {
?>
<svg xmlns="http://www.w3.org/2000/svg" class="inline-block ml-1 h-5 w-5 text-red-500" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<title><?php echo esc_html__( 'Error in email sending.', 'email-subscribers' ); ?></title>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<?php
}
?>
</p>
<div id="subscribers-stats" class="clear-both">
<div class="grid grid-cols-3 gap-4 py-4 text-gray-600 text-center">
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $allocated_limit ); ?>
</span>
/
<span><?php echo esc_html( $interval ); ?></span>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php
echo esc_html__( 'Allocated limit', 'email-subscribers' );
?>
</p>
</div>
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $used_limit ); ?>
</span>
<span class="es-open-percentage-growth text-2xl font-bold leading-none text-indigo-600">
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Used', 'email-subscribers' ); ?>
</p>
</span>
</div>
<div class="p-1">
<div id="es-dashboard-click-stats">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $allocated_limit - $used_limit ); ?>
</span>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Remaining', 'email-subscribers' ); ?>
</p>
</div>
</div>
</div>
<p class="pt-3 xl:pr-3 2xl:pr-0 text-sm text-gray-500">
<?php
/* translators: Mailer name name */
echo sprintf( esc_html__( 'Emails beyond the first %1$d will be sent through %2$s.', 'email-subscribers' ), esc_html( $allocated_limit ), '<a href="' . esc_url( $settings_url ) . '" target="_blank">' . esc_html( $current_mailer_name ) . '</a>' );
?>
</p>
</div>
</div>

View File

@@ -0,0 +1,105 @@
<div id="sending-service-benefits" class="pr-6 pl-6 w-full <?php echo 1 !== $ess_onboarding_step || 'yes' === $ess_optin ? 'hidden' : ''; ?>">
<p class="pb-3 text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php echo esc_html__( 'Use our Email Sending Service', 'email-subscribers' ); ?>
</span>
</p>
<img class="absolute bottom-0 right-0 w-24 -mr-3 " src="<?php echo esc_url( ES_PLUGIN_URL . '/lite/admin/images/dashboard-send-newsletter.png' ); ?>">
<div class="step-1 block-description" style="width: calc(100% - 4rem)">
<ul class="pt-2 pb-1 space-y-2 text-sm font-medium leading-5 text-gray-400">
<li class="flex items-start space-x-3 group">
<div class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5">
<span class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"></span>
</div>
<p class="xl:pr-3 2xl:pr-0 text-sm text-gray-500"><?php echo esc_html__( 'Start with 100 free emails / day', 'email-subscribers' ); ?></p></li>
<li class="flex items-start space-x-3 group">
<div class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5">
<span
class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
></span>
</div>
<p class="xl:pr-3 2xl:pr-0 text-sm text-gray-500"><?php echo esc_html__( 'High speed email sending', 'email-subscribers' ); ?></p>
</li>
<li class="flex items-start space-x-3 group">
<div class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5">
<span
class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
></span>
</div>
<p class="xl:pr-3 2xl:pr-0 text-sm text-gray-500">
<?php echo esc_html__( 'Reliable email delivery', 'email-subscribers' ); ?>
</p>
</li>
</ul>
<a id="ig-ess-optin-cta" href="#" class="inline-flex justify-center px-1.5 py-1 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-600 border border-indigo-500 rounded-md cursor-pointer select-none focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:bg-indigo-500 hover:text-white hover:shadow-md md:px-2 lg:px-3 xl:px-4 mt-6">
<?php echo esc_html__( 'Let\'s start →', 'email-subscribers' ); ?>
</a>
</div>
</div>
<?php
if ( 'yes' === $ess_optin ) {
?>
<script type="text/javascript">
jQuery(document).ready(function(){
setTimeout(function(){
jQuery('#ig-ess-optin-cta').trigger('click');
},1000);
});
</script>
<?php
}
?>
<div id="sending-service-onboarding-tasks-list" class="pr-6 pl-6 w-full <?php echo 2 !== $ess_onboarding_step && 'yes' !== $ess_optin ? 'hidden' : ''; ?>">
<p class="pb-3 text-lg font-medium leading-6 text-gray-400">
<span class="leading-7">
<?php echo esc_html__( 'Excellent choice!', 'email-subscribers' ); ?>
</span>
</p>
<img class="absolute bottom-0 right-0 w-24 -mr-3 " src="<?php echo esc_url( ES_PLUGIN_URL . '/lite/admin/images/dashboard-send-newsletter.png' ); ?>">
<ul class="pt-2 pb-1 space-y-2 text-sm font-medium leading-5 text-gray-400 pt-2">
<li id="ig-es-onboard-create_ess_account" class="flex items-start space-x-3 group">
<div class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5">
<span class="animate-ping absolute w-4 h-4 bg-indigo-200 rounded-full"></span>
<span class="relative block w-2 h-2 bg-indigo-700 rounded-full"></span>
</div>
<p class="text-sm text-indigo-800">
<?php
/* translators: 1: Main List 2: Test List */
echo sprintf( esc_html__( 'Creating your account', 'email-subscribers' ), esc_html( IG_MAIN_LIST ), esc_html( IG_DEFAULT_LIST ) );
?>
</p>
</li>
<li id="ig-es-onboard-dispatch_emails_from_server" class="flex items-start space-x-3 group">
<div
class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
>
<span
class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
></span>
</div>
<p class="text-sm"><?php echo esc_html__( 'Sending a test email', 'email-subscribers' ); ?></p>
</li>
<li id="ig-es-onboard-check_test_email_on_server" class="flex items-start space-x-3 group">
<div
class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
>
<span
class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
></span>
</div>
<p class="text-sm">
<?php echo esc_html__( 'Confirming email delivery', 'email-subscribers' ); ?>
</p>
</li>
</ul>
<a id="ig-es-complete-ess-onboarding" href="#" class="inline-flex justify-center px-1.5 py-1 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-600 border border-indigo-500 rounded-md cursor-pointer select-none focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:bg-indigo-500 hover:text-white hover:shadow-md md:px-2 lg:px-3 xl:px-4 mt-6 <?php echo 2 === $ess_onboarding_step ? '' : 'opacity-50 pointer-events-none'; ?>">
<span class="button-text inline-block mr-1">
<?php echo esc_html__( 'Processing', 'email-subscribers' ); ?>
</span>
<span class="es-btn-arrow"> → </span>
<svg style="display:none" class="es-btn-loader h-4 w-4 text-white-600 mt-0.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
</a>
</div>

View File

@@ -0,0 +1,29 @@
<table id="recent-subscribers-activities" class="mt-2 w-full bg-white rounded-md overflow-hidden" style="<?php echo ! empty( $upsell ) ? 'filter:blur(1px);' : ''; ?>">
<tbody>
<?php
$allowed_html_tags = ig_es_allowed_html_tags_in_esc();
if ( ! empty( $recent_activities ) ) {
foreach ( $recent_activities as $activitiy ) {
?>
<tr class="border-b border-gray-200 text-sm leading-5">
<td class="py-3 text-gray-500">
<span>
<?php echo wp_kses( $activitiy['text'], $allowed_html_tags ); ?>
</span>
</td>
<td class="pl-1 py-3 text-gray-600 text-right">
<span>
<?php echo esc_html( $activitiy['time'] ); ?>
</span>
</td>
</tr>
<?php
}
} else {
?>
<tr><td><?php echo esc_html__( 'No recent activities found.', 'email-subscribers' ); ?></td></tr>
<?php
}
?>
</tbody>
</table>

View File

@@ -0,0 +1,148 @@
<?php
if ( ! empty( $campaigns ) && count( $campaigns ) > 0 ) { ?>
<ul>
<?php
$is_pro = ES()->is_pro();
foreach ( $campaigns as $campaign_id => $campaign ) {
$reports_url = add_query_arg( 'list', $campaign['hash'], add_query_arg( 'action', 'view', admin_url( 'admin.php?page=es_reports' ) ) );
?>
<li
<?php
if ( count($campaigns) - 1 != $campaign_id ) {
?>
class="border-b border-gray-200" <?php } ?>>
<a href="<?php echo esc_url( $reports_url ); ?>" class="block py-3 hover:bg-gray-50 focus:outline-none focus:bg-gray-50 transition duration-150 ease-in-out" target="_blank">
<div class="flex items-center px-3">
<div class="w-3/5 min-w-0 flex-1">
<div class="items-center text-sm ">
<span class="inline-block leading-5 flex items-start text-gray-500">
<svg class="flex-shrink-0 mr-1.5 h-5 w-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
<?php
if ( in_array( $campaign['campaign_type'], array( 'newsletter' ), true ) ) {
?>
<path fill-rule="evenodd" d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884zM18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z" clip-rule="evenodd"/>
</svg>
<?php } elseif ( in_array( $campaign['campaign_type'], array( 'post_notification', 'post_digest' ) ) ) { ?>
<path d="M7,0A6,6,0,0,0,1,6V9.59l-.71.7a1,1,0,0,0-.21,1.09A1,1,0,0,0,1,12H13a1,1,0,0,0,.92-.62,1,1,0,0,0-.21-1.09L13,9.59V6A6,6,0,0,0,7,0Z"/>
<path d="M7,16a3,3,0,0,1-3-3h6A3,3,0,0,1,7,16Z"/>
</svg>
<?php } ?>
<span class="inline-block mr-1"><?php echo esc_html( $campaign['type'] ); ?></span>
<?php
if ( 'Sent' === $campaign['status'] ) {
?>
<svg class="flex-shrink-0 mr-1.5 h-5 w-5 text-green-400" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
</svg>
<span><?php echo esc_html__( 'Sent on', 'email-subscribers' ); ?>
<time datetime=""> <?php echo esc_html( $campaign['finish_at'] ); ?> </time>
</span>
<?php
} elseif ( 'In Queue' === $campaign['status'] ) {
?>
<svg class="flex-shrink-0 mr-1.5 h-5 w-5 text-orange-400" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"/>
<span><?php echo esc_html__( 'In Queue', 'email-subscribers' ); ?>
</span>
<?php } elseif ( ( 'Sending' === $campaign['status'] ) ) { ?>
<svg class="flex-shrink-0 mr-1.5 h-5 w-5 text-yellow-400" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-8.707l-3-3a1 1 0 00-1.414 1.414L10.586 9H7a1 1 0 100 2h3.586l-1.293 1.293a1 1 0 101.414 1.414l3-3a1 1 0 000-1.414z" clip-rule="evenodd"/>
<span><?php echo esc_html__( 'Started at', 'email-subscribers' ); ?>
<time datetime=""><?php echo esc_html( $campaign['start_at'] ); ?> </time>
</span>
<?php
}
?>
</span>
</div>
<div class="text-base mt-2 pr-4">
<?php echo esc_html( $campaign['title'] ); ?>
</div>
</div>
<?php
if ( $is_pro ) {
?>
<div class="sm:grid sm:grid-cols-4 flex-1">
<?php
} else {
?>
<div class="sm:grid sm:grid-cols-3 flex-1">
<?php
}
?>
<div class="p-3">
<span class="leading-none text-sm text-indigo-500">
<?php echo esc_html( number_format_i18n( $campaign['total_sent'] ) ); ?>
</span>
<p class="mt-1 leading-6 text-gray-400">
<?php echo esc_html__( 'Sent', 'email-subscribers' ); ?>
</p>
</div>
<div class="p-3">
<span class="leading-none text-sm text-indigo-500">
<?php echo esc_html( number_format_i18n( $campaign['total_opens'] ) ); ?> (
<?php
echo esc_html( $campaign['campaign_opens_rate'] )
?>
%)
</span>
<p class="mt-1 leading-6 text-gray-400">
<?php echo esc_html__( 'Opens', 'email-subscribers' ); ?>
</p>
</div>
<?php
if ( ES()->is_pro() ) {
?>
<div class="p-3">
<span class="leading-none text-sm text-indigo-500">
<?php echo esc_html( number_format_i18n( $campaign['total_clicks'] ) ); ?> (
<?php
echo esc_html( $campaign['campaign_clicks_rate'] )
?>
%)
</span>
<p class="mt-1 leading-6 text-gray-400">
<?php echo esc_html__( 'Clicks', 'email-subscribers' ); ?>
</p>
</div>
<?php
}
?>
<div class="p-3">
<span class="leading-none text-sm text-indigo-500">
<?php echo esc_html( number_format_i18n( $campaign['total_unsubscribe'] ) ); ?> (
<?php
echo esc_html( $campaign['campaign_losts_rate'] )
?>
%)
</span>
<p class="mt-1 leading-6 text-gray-400">
<?php echo esc_html__( 'Unsubscribes', 'email-subscribers' ); ?>
</p>
</div>
</div>
</div>
</a>
</li>
<?php
}
?>
</ul>
<?php
} else {
$campaign_url = admin_url( 'admin.php?page=es_campaigns' );
?>
<p class="px-2 py-2 text-sm leading-5 text-gray-900">
<?php echo esc_html__( 'No recent campaigns were found.', 'email-subscribers' ); ?>
</p>
<a href="<?php echo esc_url( $campaign_url ); ?>" class="inline-flex justify-center py-1 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-indigo-600 border border-indigo-500 rounded-md cursor-pointer select-none focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:bg-indigo-500 hover:text-white hover:shadow-md md:px-1 lg:px-3 xl:px-3 ml-2">
<span>
<?php echo esc_html__( 'Create Campaign', 'email-subscribers' ); ?>
</span>
</a>
<?php
}

View File

@@ -0,0 +1,48 @@
<?php
if ( ! empty( $sequence_stats ) ) {
?>
<div id="sequence-stats" class="grid grid-cols-4 gap-4 py-4 text-gray-600 text-center" style="<?php echo ! empty( $upsell ) ? 'filter:blur(1px);' : ''; ?>">
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $sequence_stats['sent'] ); ?>
</span>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Sent', 'email-subscribers' ); ?>
</p>
</div>
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $sequence_stats['opens'] ); ?>
</span>
<span class="text-sm mr-0.5">
<?php echo esc_html( $sequence_stats['open_rate'] ); ?>%
</span>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Opens', 'email-subscribers' ); ?>
</p>
</div>
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $sequence_stats['clicks'] ); ?>
</span>
<span class="text-sm mr-0.5">
<?php echo esc_html( $sequence_stats['click_rate'] ); ?>%
</span>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Clicks', 'email-subscribers' ); ?>
</p>
</div>
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $sequence_stats['unsubscribes'] ); ?>
</span>
<span class="text-sm mr-0.5">
<?php echo esc_html( $sequence_stats['unsubscribe_rate'] ); ?>%
</span>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Unsubscribes', 'email-subscribers' ); ?>
</p>
</div>
</div>
<?php
}

View File

@@ -0,0 +1,86 @@
<p class="pb-3 text-lg font-medium leading-6 text-gray-400">
<span>
<?php
echo esc_html__( 'Auto-responder sequence', 'email-subscribers' );
?>
<?php
if ( ! empty( $upsell ) ) {
$utm_args = array(
'utm_medium' => 'dashboard-sequence-stat',
'url' => 'https://www.icegram.com/documentation/email-sequence/'
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block max"></span>
</a>
<?php
}
?>
</span>
<?php
if ( ES()->is_pro() ) {
?>
<span class="float-right">
<?php
if ( ! empty( $sequence_messages ) ) {
?>
<select id="filter_by_sequence">
<?php
foreach ( $sequence_messages as $message ) {
$message_subject = $message['subject'];
?>
<option value="<?php echo esc_html( $message['id'] ); ?>">
<?php
echo esc_html( $message_subject );
?>
</option>
<?php
}
?>
</select>
<?php
}
?>
</span>
<?php
}
?>
</p>
<?php
if ( ! empty( $upsell ) ) {
$sequence_stats = array(
'sent' => 0,
'opens' => 0,
'clicks' => 0,
'unsubscribes' => 0,
'open_rate' => 0,
'click_rate' => 0,
'unsubscribe_rate' => 0
);
ES_Admin::get_view(
'dashboard/sequence-stats',
array(
'sequence_stats' => $sequence_stats,
'upsell' => true,
)
);
} else {
if ( ! empty( $sequence_messages ) ) {
$first_message_id = $sequence_messages[0]['id'];
do_action( 'ig_es_show_sequence_message_stats', $first_message_id );
} else {
?>
<p>
<?php
$new_sequence_url = admin_url( 'admin.php?page=es_sequence&action=new' );
echo esc_html__( 'No auto-responder sequence found.', 'email-subscribers' );
/* translators: %s: Create new sequence link */
echo ' ' . sprintf( esc_html__( 'Click %1$shere%2$s to create new.', 'email-subscribers' ), '<a href="' . esc_url( $new_sequence_url ) . '" target="_blank">', '</a>' );
?>
</p>
<?php
}
}

View File

@@ -0,0 +1,313 @@
<?php
$allowed_html_tags = ig_es_allowed_html_tags_in_esc();
$total_subscribed = isset( $reports_data['total_subscribed'] ) ? $reports_data['total_subscribed'] : 0;
$total_email_opens = isset( $reports_data['total_email_opens'] ) ? $reports_data['total_email_opens'] : 0;
$total_open_rate = isset( $reports_data['total_open_rate'] ) ? $reports_data['total_open_rate'] : 0;
$total_message_sent = isset( $reports_data['total_message_sent'] ) ? $reports_data['total_message_sent'] : 0;
$total_links_clicks = isset( $reports_data['total_links_clicks'] ) ? $reports_data['total_links_clicks'] : 0;
$total_click_rate = isset( $reports_data['total_click_rate'] ) ? $reports_data['total_click_rate'] : 0;
$total_unsubscribed = isset( $reports_data['total_unsubscribed'] ) ? $reports_data['total_unsubscribed'] : 0;
$contacts_growth = isset( $reports_data['contacts_growth'] ) ? $reports_data['contacts_growth'] : array();
$campaigns = isset( $reports_data['campaigns'] ) ? $reports_data['campaigns'] : array();
$sent_percentage_growth = isset( $reports_data['sent_percentage_growth'] ) ? $reports_data['sent_percentage_growth'] : 0;
$sent_before_two_months = isset( $reports_data['sent_before_two_months'] ) ? $reports_data['sent_before_two_months'] : 0;
$open_percentage_growth = isset( $reports_data['open_percentage_growth'] ) ? $reports_data['open_percentage_growth'] : 0;
$open_before_two_months = isset( $reports_data['open_before_two_months'] ) ? $reports_data['open_before_two_months'] : 0;
$click_percentage_growth = isset( $reports_data['click_percentage_growth'] ) ? $reports_data['click_percentage_growth'] : 0;
$click_before_two_months = isset( $reports_data['click_before_two_months'] ) ? $reports_data['click_before_two_months'] : 0;
$unsubscribe_percentage_growth = isset( $reports_data['unsubscribe_percentage_growth'] ) ? $reports_data['unsubscribe_percentage_growth'] : 0;
$unsubscribe_before_two_months = isset( $reports_data['unsubscribe_before_two_months'] ) ? $reports_data['unsubscribe_before_two_months'] : 0;
$args = array(
'days' => $days,
);
$growth_percentage = ES_Reports_Data::get_contacts_growth_percentage( $args );
$last_subscribed_contacts = (int) ES()->contacts_db->get_total_subscribed_contacts_between_days( $days );
$convert_date_format = get_option( 'date_format' );
$last_period_start_date = gmdate( $convert_date_format, strtotime( '-' . ( 2 * $days ) . ' days' ) );
$last_period_end_date = gmdate( $convert_date_format, strtotime( '-' . $days . ' days' ) );
?>
<div id="subscribers-stats" class="clear-both">
<div class="grid grid-cols-3 gap-4 pt-4 text-gray-600 text-center">
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $total_subscribed ); ?>
</span>
<div class="inline-block es-new-subscriber-growth-percentage es-tooltip relative align-middle cursor-pointer text-left">
<?php
if ( 0 !== $growth_percentage ) {
$text_color_class = '';
$arraw_html = '';
if ( $growth_percentage < 0 ) {
$text_color_class = 'text-red-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>';
} else {
$text_color_class = 'text-green-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>';
}
?>
<span class="text-sm mr-0.5 <?php echo esc_attr( $text_color_class ); ?>">
<?php echo esc_html( number_format_i18n( $growth_percentage, 2 ) ); ?>%
<?php echo wp_kses( $arraw_html, $allowed_html_tags ); ?>
</span>
<?php
}
?>
<span class="break-words invisible h-auto lg:w-48 xl:w-64 tracking-wide absolute z-70 tooltip-text bg-black text-gray-300 text-xs rounded p-3 py-2">
<div class="text-white-100">
<div>
<span class="text-lg text-base">
<?php echo esc_html__( 'New subscribers', 'email-subscribers' ); ?>:
<?php echo esc_html( number_format_i18n( $last_subscribed_contacts ) ); ?>
</span>
</div>
</div>
<div class="text-xs mt-1 pt-1 text-gray-100 border-t border-gray-100">
<?php
/* translators: 1. Start date 2. End date */
echo esc_html__( sprintf( '%1$s to %2$s', $last_period_start_date, $last_period_end_date ), 'email-subscribers' );
?>
</div>
<svg class="tooltip-arrow absolute mt-2 text-black text-opacity-100 h-2.5 left-0" viewBox="0 0 255 255">
<polygon class="fill-current" points="0,0 127.5,127.5 255,0"></polygon>
</svg>
</span>
</div>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'New subscribers', 'email-subscribers' ); ?>
</p>
</div>
<div class="pt-1 pr-1 pl-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $total_unsubscribed ); ?>
</span>
<div class="inline-block es-tooltip relative align-middle cursor-pointer text-left">
<?php
if ( 0 !== $unsubscribe_percentage_growth ) {
$text_color_class = '';
$arraw_html = '';
if ( $unsubscribe_percentage_growth > 0 ) {
$text_color_class = 'text-red-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>';
} else {
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>';
$text_color_class = 'text-green-600';
}
?>
<span class="text-sm mr-0.5 <?php echo esc_attr( $text_color_class ); ?>">
<?php echo esc_html( $unsubscribe_percentage_growth ); ?>%
<?php echo wp_kses( $arraw_html, $allowed_html_tags ); ?>
</span>
<?php
}
?>
<span class="break-words invisible h-auto lg:w-48 xl:w-64 tracking-wide absolute z-70 tooltip-text bg-black text-gray-300 text-xs rounded p-3 py-2">
<div class="text-white-100">
<div>
<span class="text-lg text-base">
<?php echo esc_html__( 'Unsubscribes', 'email-subscribers' ); ?>:
<?php echo esc_html( $unsubscribe_before_two_months ); ?>
</span>
</div>
</div>
<div class="text-xs mt-1 pt-1 text-gray-100 border-t border-gray-100">
<?php
/* translators: 1. Start date 2. End date */
echo esc_html__( sprintf( '%1$s to %2$s', $last_period_start_date, $last_period_end_date ), 'email-subscribers' );
?>
</div>
<svg class="tooltip-arrow absolute mt-2 text-black text-opacity-100 h-2.5 left-0" viewBox="0 0 255 255">
<polygon class="fill-current" points="0,0 127.5,127.5 255,0"></polygon>
</svg>
</span>
</div>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php
if ( ES()->is_pro() ) {
?>
<a id="view_unsubscribe_feedback_button" class="pb-2 pl-1 leading-5" style="cursor: pointer;" href="#">
<?php echo esc_html__( 'Unsubscribed', 'email-subscribers' ); ?>
</a>
<?php
} else {
?>
<?php echo esc_html__( 'Unsubscribed', 'email-subscribers' ); ?>
<?php
}
?>
</p>
<?php do_action( 'ig_es_show_unsubscribe_feedback_reasons_stats', $days, $total_unsubscribed ); ?>
</div>
<div class="p-1">
<?php
do_action( 'ig_es_show_bounced_contacts_stats', $days, $reports_data );
?>
</div>
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $total_message_sent ); ?>
</span>
<div class="inline-block es-tooltip relative align-middle cursor-pointer text-left">
<?php
if ( 0 !== $sent_percentage_growth ) {
$text_color_class = '';
$arraw_html = '';
if ( $sent_percentage_growth < 0 ) {
$text_color_class = 'text-red-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>';
} else {
$text_color_class = 'text-green-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>';
}
?>
<span class="text-sm mr-0.5 <?php echo esc_attr( $text_color_class ); ?>">
<?php echo esc_html( $sent_percentage_growth ); ?>%
<?php echo wp_kses( $arraw_html, $allowed_html_tags ); ?>
</span>
<?php
}
?>
<span class="break-words invisible h-auto lg:w-48 xl:w-64 tracking-wide absolute z-70 tooltip-text bg-black text-gray-300 text-xs rounded p-3 py-2">
<div class="text-white-100">
<div>
<span class="text-lg text-base">
<?php echo esc_html__( 'Sent', 'email-subscribers' ); ?>:
<?php echo esc_html( $sent_before_two_months ); ?>
</span>
</div>
</div>
<div class="text-xs mt-1 pt-1 text-gray-100 border-t border-gray-100">
<?php
/* translators: 1. Start date 2. End date */
echo esc_html__( sprintf( '%1$s to %2$s', $last_period_start_date, $last_period_end_date ), 'email-subscribers' );
?>
</div>
<svg class="tooltip-arrow absolute mt-2 text-black text-opacity-100 h-2.5 left-0" viewBox="0 0 255 255">
<polygon class="fill-current" points="0,0 127.5,127.5 255,0"></polygon>
</svg>
</span>
</div>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Sent', 'email-subscribers' ); ?>
</p>
</div>
<div class="p-1">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $total_email_opens ); ?>
</span>
<div class="inline-block es-tooltip relative align-middle cursor-pointer text-left">
<?php
if ( 0 !== $open_percentage_growth ) {
$text_color_class = '';
$arraw_html = '';
if ( $open_percentage_growth < 0 ) {
$text_color_class = 'text-red-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>';
} else {
$text_color_class = 'text-green-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>';
}
?>
<span class="text-sm mr-0.5 <?php echo esc_attr( $text_color_class ); ?>">
<?php echo esc_html( $open_percentage_growth ); ?>%
<?php echo wp_kses( $arraw_html, $allowed_html_tags ); ?>
</span>
<?php
}
?>
<span class="break-words invisible h-auto lg:w-48 xl:w-64 tracking-wide absolute z-70 tooltip-text bg-black text-gray-300 text-xs rounded p-3 py-2">
<div class="text-white-100">
<div>
<span class="text-lg text-base">
<?php echo esc_html__( 'Opens', 'email-subscribers' ); ?>:
<?php echo esc_html( $open_before_two_months ); ?>
</span>
</div>
</div>
<div class="text-xs mt-1 pt-1 text-gray-100 border-t border-gray-100">
<?php
/* translators: 1. Start date 2. End date */
echo esc_html__( sprintf( '%1$s to %2$s', $last_period_start_date, $last_period_end_date ), 'email-subscribers' );
?>
</div>
<svg class="tooltip-arrow absolute mt-2 text-black text-opacity-100 h-2.5 left-0" viewBox="0 0 255 255">
<polygon class="fill-current" points="0,0 127.5,127.5 255,0"></polygon>
</svg>
</span>
</div>
<span class="es-open-percentage-growth text-2xl font-bold leading-none text-indigo-600">
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Opens', 'email-subscribers' ); ?>
</p>
</span>
</div>
<div class="p-1">
<div id="es-dashboard-click-stats">
<span class="text-2xl font-bold leading-none text-indigo-600">
<?php echo esc_html( $total_links_clicks ); ?>
</span>
<div class="inline-block es-tooltip relative align-middle cursor-pointer text-left">
<?php
if ( 0 !== $click_percentage_growth ) {
$text_color_class = '';
$arraw_html = '';
if ( $click_percentage_growth < 0 ) {
$text_color_class = 'text-red-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>';
} else {
$text_color_class = 'text-green-600';
$arraw_html = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>';
}
?>
<span class="text-sm mr-0.5 <?php echo esc_attr( $text_color_class ); ?>">
<?php echo esc_html( $click_percentage_growth ); ?>%
<?php echo wp_kses( $arraw_html, $allowed_html_tags ); ?>
</span>
<?php
}
?>
<span class="break-words invisible h-auto lg:w-48 xl:w-64 tracking-wide absolute z-70 tooltip-text bg-black text-gray-300 text-xs rounded p-3 py-2">
<div class="text-white-100">
<div>
<span class="text-lg text-base">
<?php echo esc_html__( 'Clicks', 'email-subscribers' ); ?>:
<?php echo esc_html( $click_before_two_months ); ?>
</span>
</div>
</div>
<div class="text-xs mt-1 pt-1 text-gray-100 border-t border-gray-100">
<?php
/* translators: 1. Start date 2. End date */
echo esc_html__( sprintf( '%1$s to %2$s', $last_period_start_date, $last_period_end_date ), 'email-subscribers' );
?>
</div>
<svg class="tooltip-arrow absolute mt-2 text-black text-opacity-100 h-2.5 left-0" viewBox="0 0 255 255">
<polygon class="fill-current" points="0,0 127.5,127.5 255,0"></polygon>
</svg>
</span>
</div>
<p class="mt-1 font-medium leading-6 text-gray-500">
<?php echo esc_html__( 'Clicks', 'email-subscribers' ); ?>
<?php
if ( ! ES()->is_pro() ) {
$utm_args = array(
'utm_medium' => 'dashboard-click-stat',
'url' => 'https://www.icegram.com/documentation/what-analytics-does-email-subscribers-track/'
);
$pricing_url = ES_Common::get_utm_tracking_url( $utm_args );
?>
<a target="_blank" href="<?php echo esc_url( $pricing_url ); ?>">
<span class="premium-icon inline-block max"></span>
</a>
<?php
}
?>
</p>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,48 @@
<?php
$manage_templates_url = admin_url( 'admin.php?page=es_gallery&manage-templates=yes' );
$reports_url = admin_url( 'admin.php?page=es_reports' );
$settings_url = admin_url( 'admin.php?page=es_settings' );
$topics_indexes = array_rand( $topics, 4 );
?>
<ul>
<!-- Start-IG-Code -->
<?php foreach ( $topics_indexes as $index ) { ?>
<li class="border-b border-gray-200 mb-0">
<a href="<?php echo esc_url( $topics[ $index ]['link'] ); ?>" class="block transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:bg-gray-50" target="_blank">
<div class="flex items-center pr-2 py-2 md:justify-between">
<div class="text-sm leading-5 text-gray-900">
<?php
echo wp_kses_post( $topics[ $index ]['title'] );
if ( ! empty( $topics[ $index ]['label'] ) ) {
?>
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full <?php echo esc_attr( $topics[ $index ]['label_class'] ); ?>"><?php echo esc_html( $topics[ $index ]['label'] ); ?></span>
<?php } ?>
</div>
<div>
<svg class="w-5 h-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
</svg>
</div>
</div>
</a>
</li>
<?php } ?>
<!-- End-IG-Code -->
<li class="">
<div class="pr-2 py-2 text-sm leading-5 text-gray-900 sm:pr-2">
<?php echo esc_html__( 'Jump to: ', 'email-subscribers' ); ?>
<a href="<?php echo esc_url( $reports_url ); ?>" class="font-bold" target="_blank">
<?php echo esc_html__( 'Reports', 'email-subscribers' ); ?>
</a>
<a href="<?php echo esc_url( $manage_templates_url ); ?>" class="font-bold" target="_blank">
<?php echo esc_html__( 'Templates', 'email-subscribers' ); ?>
</a>
<a href="<?php echo esc_url( $settings_url ); ?>" class="font-bold" target="_blank">
<?php echo esc_html__( 'Settings', 'email-subscribers' ); ?>
</a>
</div>
</li>
</ul>

View File

@@ -0,0 +1,57 @@
<table id="top-countries" class="mt-2 w-full bg-white rounded-md overflow-hidden" style="<?php echo ! empty( $upsell ) ? 'filter:blur(1px);' : ''; ?>">
<thead>
<tr>
<th class="w-1/3 px-4 py-3 font-bold text-center" colspan="2">
<span class="font-">
<?php echo esc_html__( 'Country', 'email-subscribers' ); ?>
</span>
</th>
<th class="w-1/3 px-1 py-3 font-bold text-right">
<span>
<?php echo esc_html__( 'Subscribers', 'email-subscribers' ); ?>
</span>
</th>
</tr>
</thead>
<tbody>
<?php
if ( ! empty( $top_countries ) ) {
$countries = ES_Geolocation::get_countries();
foreach ( $top_countries as $country_code => $total_subscribers ) {
if ( 'others' === $country_code ) {
$country_name = __('Others', 'email-subscribers');
} else {
$country_name = ! empty( $countries[ $country_code ] ) ? $countries[ $country_code ] : '';
}
?>
<tr class="border-b border-gray-200 text-xs leading-5">
<td class="mx-4 my-3 px-1 py-1 country_flag column-country_flag">
<p id="es-flag-icon" class="ml-0 xl:ml-1.5 inline-block leading-5 flag-icon flag-icon-<?php echo esc_attr( strtolower( $country_code ) ); ?>"></p>
</td>
<td class="pl-4 py-3 text-gray-500 text-left">
<span>
<?php echo esc_html( $country_name ); ?>
</span>
</td>
<td class="pl-1 py-3 text-gray-600 text-right">
<span>
<?php echo esc_html( number_format_i18n( $total_subscribers ) ); ?>
</span>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="3">
<span>
<?php echo esc_html__( 'No country data found.', 'email-subscribers' ); ?>
</span>
</td>
</tr>
<?php
}
?>
</tbody>
</table>

View File

@@ -0,0 +1,124 @@
<?php
$admin_email = get_option( 'admin_email' );
?>
<div id="ig-es-trial-optin-section" class="hidden">
<form id="ig-es-trial-optin-form" method="post">
<?php wp_nonce_field( 'ig-es-trial-optin-nonce', 'ig_es_trial_optin_nonce' ); ?>
<h3 class="text-lg font-medium tracking-tight text-gray-900">
<?php echo esc_html__( 'Sign up now', 'email-subscribers' ); ?>
</h3>
<div class="pt-1 space-y-2 text-sm">
<div class="w-full">
<input
id="ig-es-sign-up-name"
class="block w-full mt-1 text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
placeholder="<?php echo esc_html__('Your name', 'email-subscribers' ); ?>"
/>
</div>
</div>
<div class="pt-1 space-y-2 text-sm">
<div class="w-full">
<input
type="email"
id="ig-es-sign-up-email"
class="es_onboard_email block w-full mt-1 text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
placeholder="<?php echo esc_html__('Your email', 'email-subscribers' ); ?>"
value="<?php echo esc_attr( $admin_email ); ?>"
/>
</div>
</div>
<div class="pt-3 space-y-2 text-sm">
<button id="ig-es-trial-optin-btn" type="button" class="ig-es-primary-button ig-es-inline-loader inline-flex px-3 py-1 text-sm inline-block">
<span>
<?php echo esc_html__( 'Start trial', 'email-subscribers' ); ?>
</span>
<svg class="es-btn-loader animate-spin h-4 w-4 text-indigo"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor"
stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
</button>
</div>
</form>
<div id="ig-es-trial-optin-success-block" class="hidden">
<h3 class="text-lg font-medium tracking-tight text-gray-900">
<?php echo esc_html__( 'It\'s done!', 'email-subscribers' ); ?>
</h3>
<div class="pt-1 space-y-2 text-sm">
<div class="w-full">
<p class="pt-3 xl:pr-3 2xl:pr-0 text-sm text-gray-500">
<?php
/* translators: 1: Trial period in days. */
echo esc_html__(
sprintf(
'Enjoy benefits of automatic email sending, advance spam protection and more for next %d days.',
ES()->trial->get_trial_period( 'in_days' )
),
'email-subscribers'
);
?>
</p>
</div>
</div>
</div>
<div id="ig-es-trial-optin-error-block" class="hidden">
<div class="pt-1 space-y-2 text-sm">
<div class="w-full">
<p id="error-message-text" class="text-sm leading-5 text-red-500">
<?php echo esc_html__( 'Something went wrong. Please try again later.', 'email-subscribers' ); ?>
</p>
</div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#ig-es-trial-optin-cta').on('click', function(e) {
e.preventDefault();
$('#ig-es-trial-optin-block').removeClass('bg-teal-100').addClass('bg-white').html('');
$('#ig-es-trial-optin-section').removeClass('hidden').detach().appendTo('#ig-es-trial-optin-block');
});
$('#ig-es-trial-optin-btn').click(function(){
let btn_elem = $(this);
let name = $('#ig-es-sign-up-name').val();
let email = $('#ig-es-sign-up-email').val();
let security = $('#ig_es_trial_optin_nonce').val();
let data = {
action: 'ig_es_trial_optin',
name: name,
email: email,
security: security,
};
jQuery.ajax({
method: 'POST',
url: ajaxurl,
data: data,
dataType: 'json',
beforeSend: function() {
$(btn_elem).attr('disabled', 'disabled').addClass('loading');
},
success: function (response) {
if (response.success) {
$('#ig-es-trial-optin-form,#ig-es-trial-optin-error-block').addClass('hidden');
$('#ig-es-trial-optin-success-block').removeClass('hidden');
$('#ig-es-trial-optin-block').removeClass('bg-white').addClass('bg-teal-100');
} else {
if ( response.data.message_text ) {
$('#error-message-text').text(response.data.message_text);
}
$('#ig-es-trial-optin-error-block').removeClass('hidden');
}
},
error: function (err) {
alert(ig_es_js_data.i18n_data.ajax_error_message);
}
}).always(function(){
$(btn_elem).removeAttr('disabled', 'disabled').removeClass('loading');
});
});
});
</script>

View File

@@ -0,0 +1,235 @@
<?php
defined( 'ABSPATH' ) || exit;
$es_wp_styles = wp_styles();
?>
<html>
<?php
$es_wp_styles->do_item( 'google-fonts' );
?>
<style>
html {
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
body {
background: #efeeea;
margin: 0;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}
.container {
background: #FFFFFF;
border: 1px solid #efeeea;
max-width: 600px;
margin: 20px auto;
padding: 10px;
border-radius: 5px;
}
.center {
text-align: center;
}
.logo-container {
margin: 20px 10px;
}
.heading {
font-size: 2em;
margin: 20px auto;
color: #2a231c;
}
.sub-heading {
color: #433c36;
font-size: 0.9em;
}
.my-30 {
margin: 30px auto;
font-size: 15px;
}
.mt-10 {
margin-top: 10px;
}
.mb-30 {
margin-bottom: 30px;
}
table {
width: 100%;
}
td {
padding: 10px;
text-align: center;
width: 33.33%;
}
td .title {
color: #433c36;
margin: 10px 0;
font-size: 15px;
}
td .value {
color: #5850ec;
font-size: 24px;
font-weight: 500;
}
.button {
background: #5850ec;
margin: unset;
padding: 20px;
display: inline-block;
text-decoration: none;
color: #FFFFFF;
}
a {
color: #5850ec;
text-decoration: none;
}
.m-auto {
margin: auto;
}
.w-95p {
width: 90%;
}
.desc {
line-height: 25px;
}
.seperator {
box-sizing:border-box;
height:0;
color:inherit;
margin:0;
border-top-width:1px;
border:solid #d1d5db;
border-width:0 0 1px;
border-style:dotted;
border-bottom-width:2px;
margin-top:2rem;
margin-bottom:2rem;
}
</style>
<body>
<div class="container">
<div class="logo-container center">
<img src="<?php esc_attr_e( $logo_url ); ?>" width="64" alt="<?php echo esc_url( 'Icegram Express logo', 'email-subscribers' ); ?>"/>
</div>
<div>
<p class="center heading"><?php esc_html_e( 'Your Weekly Email Summary', 'email-subscribers' ); ?></p>
<p class="center sub-heading"><?php esc_html_e( $start_date ); ?> - <?php esc_html_e( $end_date ); ?></p>
<hr class="seperator"/>
<p class="center"><?php esc_html_e( 'Here are your weekly stats from', 'email-subscribers' ); ?>
<b><?php esc_html_e( 'Icegram Express.', 'email-subscribers' ); ?></b>
</p>
</div>
<div>
<table>
<?php
if ( 'pro' === $plan ) {
?>
<tr>
<td>
<div class="value">
<?php esc_html_e( abs($contacts_growth) ); ?>%
<?php
if ( 0 < floatval( $contacts_growth ) ) {
?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="green" width="12" height="12"><path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
<?php
} elseif ( 0 > floatval( $contacts_growth ) ) {
?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="inline-block" fill="red" width="12" height="12"><path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>
<?php
}
?>
</div>
<div class="title"><?php esc_html_e( 'Contacts growth', 'email-subscribers' ); ?></div>
</td>
<td>
<div class="value"><?php esc_html_e( $total_subscribed ); ?></div>
<div class="title"><?php esc_html_e( 'Subscribers', 'email-subscribers' ); ?></div>
</td>
<td>
<div class="value"><?php esc_html_e( $total_unsubscribed ); ?></div>
<div class="title"><?php esc_html_e( 'Unsubscribes', 'email-subscribers' ); ?></div>
</td>
</tr>
<tr>
<td>
<div class="value"><?php esc_html_e( $total_sent_mails ); ?></div>
<div class="title"><?php esc_html_e( 'Sent Emails', 'email-subscribers' ); ?></div>
</td>
<td>
<div class="value"><?php esc_html_e( $total_opened_mails ); ?></div>
<div class="title"><?php esc_html_e( 'Opens', 'email-subscribers' ); ?></div>
</td>
<td>
<div class="value"><?php esc_html_e( $total_clicked_mails ); ?></div>
<div class="title"><?php esc_html_e( 'Clicks', 'email-subscribers' ); ?></div>
</td>
</tr>
<?php
} else {
?>
<tr>
<td>
<div class="value"><?php esc_html_e( $total_subscribed ); ?></div>
<div class="title"><?php esc_html_e( 'New Subscribers', 'email-subscribers' ); ?></div>
</td>
<td>
<div class="value"><?php esc_html_e( $total_sent_mails ); ?></div>
<div class="title"><?php esc_html_e( 'Sent Emails', 'email-subscribers' ); ?></div>
</td>
<td>
<div class="value"><?php esc_html_e( $total_opened_mails ); ?></div>
<div class="title"><?php esc_html_e( 'Opens', 'email-subscribers' ); ?></div>
</td>
</tr>
<?php
}
?>
</table>
</div>
<?php
if ( ! empty( $reports_url ) ) {
?>
<div class="center mt-10 mb-30">
<a href="<?php echo esc_url( $reports_url ); ?>"
class="button"><?php echo esc_html__( 'View More Stats', 'email-subscribers' ); ?></a>
</div>
<?php
}
?>
<?php
if ( ! empty( $unsubscribe_url ) ) {
?>
<hr class="seperator"/>
<div style="font-size: 0.9em; color: gray;">
<p class="center">
<?php
/* translators: 1. Unsubscribe link starting anchor tag 2. Unsubscribe link closing anchor tag */
echo sprintf( esc_html__( 'If you don\'t want to receive weekly account summary, then click %1$shere%2$s to unsubscribe.' ), '<a href="' . esc_url( $unsubscribe_url ) . '">', '</a>' );
?>
</p>
</div>
<?php
}
?>
</div>
</body>
</html>