id = 'email_subscription';
}
/**
* Runs when modules is enabled.
*
* @return void
*/
public function init(){
parent::init();
$this->title = __('Email Subscription', 'notificationx');
$this->popup = [
"denyButtonText" => __("More Info", "notificationx"),
"confirmButtonText" => __("Upgrade to PRO", "notificationx"),
// phpcs:disable PluginCheck.CodeAnalysis.Offloading.OffloadedContent -- False positive for this context: these are HTML email bodies and remote documentation/tutorial links in admin help text, not offloaded plugin assets. Audited 2026-07-16.
"html"=> __('
Show popups to display which users subscribed to your Newsletter.
', 'notificationx')
// phpcs:enable PluginCheck.CodeAnalysis.Offloading.OffloadedContent
];
$common_fields = [
'first_param' => 'tag_first_name',
'custom_first_param' => __('Someone' , 'notificationx'),
'second_param' => __('just subscribed to', 'notificationx'),
'third_param' => 'tag_title',
'custom_third_param' => __('Anonymous Title', 'notificationx'),
'fourth_param' => 'tag_time',
'custom_fourth_param' => __( 'Some time ago', 'notificationx' ),
];
$this->themes = [
'theme-one' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/subscriptions/mailchimp-theme-1.jpg',
'image_shape' => 'rounded',
'template' => $common_fields,
],
'theme-two' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/subscriptions/mailchimp-theme-2.png',
'template' => $common_fields,
'image_shape' => 'circle',
],
'theme-three' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/subscriptions/mailchimp-theme-three.jpg',
'image_shape' => 'square',
'template' => $common_fields,
],
'maps_theme' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/subscriptions/maps-theme-subscribed.png',
'image_shape' => 'square',
'show_notification_image' => 'maps_image',
],
];
$this->res_themes = [
'res-theme-one' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/res_subscriptions/mailchimp-res-theme-1.png',
'_template' => 'mailchimp_template_new',
'is_pro' => true,
],
'res-theme-two' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/res_subscriptions/mailchimp-res-theme-2.png',
'_template' => 'mailchimp_template_new',
'is_pro' => true,
],
'res-theme-three' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/res_subscriptions/mailchimp-res-theme-3.png',
'_template' => 'mailchimp_template_new',
'is_pro' => true,
],
'subscriptions-res-theme-four' => [
'source' => NOTIFICATIONX_ADMIN_URL . 'images/extensions/themes/res_subscriptions/mailchimp-res-theme-4.png',
'_template' => 'maps_template_new',
'is_pro' => true,
],
];
$this->templates = [
'mailchimp_template_new' => [
'first_param' => GlobalFields::get_instance()->common_name_fields(),
'third_param' => [
'tag_title' => __('List Title', 'notificationx'),
// 'tag_anonymous_title' => __('Anonymous Title' , 'notificationx'),
],
'fourth_param' => [
'tag_time' => __('Definite Time', 'notificationx'),
'tag_sometime' => __('Some time ago', 'notificationx'),
],
'_themes' => [
"{$this->id}_theme-one",
"{$this->id}_theme-two",
"{$this->id}_theme-three",
"{$this->id}_maps_theme",
],
],
];
}
public function preview_entry($entry, $settings){
$entry = array_merge($entry, [
"title" => "NotificationX Pro",
]);
if('email_subscription_maps_theme' !== $settings['theme']){
$entry['image_data'] = array(
'url' => NOTIFICATIONX_PUBLIC_URL . 'image/icons/pink-face-looped.gif',
'alt' => '',
'classes' => 'greview_icon',
);
}
return $entry;
}
}