PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / trunk
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar vtrunk
3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 All 156 releases
notificationx / includes / Extensions / BitIntegrations / BitIntegrationsEmailSubscription.php

BitIntegrationsEmailSubscription.php in NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar trunk, at includes/Extensions/BitIntegrations/BitIntegrationsEmailSubscription.php

102 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * BitIntegrations Extension
4 *
5 * @package NotificationX\Extensions
6 */
7
8 namespace NotificationX\Extensions\BitIntegrations;
9
10 use NotificationX\Core\Rules;
11 use NotificationX\GetInstance;
12 use NotificationX\Extensions\Extension;
13
14 /**
15 * BitIntegrations Extension
16 * @method static BitIntegrationsEmailSubscription get_instance($args = null)
17 */
18 class BitIntegrationsEmailSubscription extends Extension {
19 /**
20 * Instance of BitIntegrations
21 *
22 * @var BitIntegrations
23 */
24 use GetInstance;
25 use BitIntegrations;
26
27 public $priority = 15;
28 public $id = 'bitintegrations_email_subscription';
29 public $img = NOTIFICATIONX_ADMIN_URL . 'images/extensions/sources/bit-integrations.png';
30 public $doc_link = 'https://notificationx.com/docs/bit-integrations-notification-alert/';
31 public $types = 'email_subscription';
32 public $module = 'modules_bitintegrations';
33 public $module_priority = 16;
34 public $class = 'BitApps\Integrations\Config';
35
36 /**
37 * Initially Invoked when initialized.
38 */
39 public function __construct(){
40 parent::__construct();
41 }
42
43 public function init_extension()
44 {
45 $this->title = __('Bit Integrations', 'notificationx');
46 $this->module_title = __('Bit Integrations', 'notificationx');
47 }
48
49 /**
50 * Get data for BitIntegrations Extension.
51 *
52 * @param array $args Settings arguments.
53 * @return array
54 */
55 public function get_data( $args = array() ){
56 return 'Hello From BitIntegrations';
57 }
58
59 /**
60 * Error message if BitIntegrations is disabled.
61 *
62 * @param array $messages
63 * @return array
64 */
65 public function source_error_message($messages) {
66 if (!$this->class_exists()) {
67 $url = admin_url('plugin-install.php?s=bit+integrations&tab=search&type=term');
68 $messages[$this->id] = [
69 'message' => sprintf(
70 '%s <a href="%s" target="_blank">%s</a> %s',
71 __('You have to install', 'notificationx'),
72 $url,
73 __('Bit Integrations', 'notificationx'),
74 __('plugin first.', 'notificationx')
75 ),
76 'html' => true,
77 'type' => 'error',
78 'rules' => Rules::is('source', $this->id),
79 ];
80 }
81 return $messages;
82 }
83
84 public function doc(){
85 return '
86 <ul class="email_subscription nx-template-keys">
87 <li><span>' . __('Field Name:', 'notificationx') . '</span> <strong>' . __('Field Key', 'notificationx') . '</strong></li>
88 <li><span>' . __('Full Name:', 'notificationx') . '</span> <strong>name</strong></li>
89 <li><span>' . __('First Name:', 'notificationx') . '</span> <strong>first_name</strong></li>
90 <li><span>' . __('Last Name:', 'notificationx') . '</span> <strong>last_name</strong></li>
91 <li><span>' . __('Email:', 'notificationx') . '</span> <strong>email</strong></li>
92 <li><span>' . __('Title, Product Title:', 'notificationx') . '</span> <strong>title</strong></li>
93 <li><span>' . __('Anonymous Title:', 'notificationx') . '</span> <strong>anonymous_title</strong></li>
94 <li><span>' . __('Definite Time:', 'notificationx') . '</span> <strong>timestamp</strong></li>
95 <li><span>' . __('Some time ago:', 'notificationx') . '</span> <strong>sometime</strong></li>
96 <li><span>' . __('City:', 'notificationx') . '</span> <strong>city</strong></li>
97 <li><span>' . __('Country:', 'notificationx') . '</span> <strong>country</strong></li>
98 <li><span>' . __('City,Country:', 'notificationx') . '</span> <strong>city_country</strong></li>
99 </ul>';
100 }
101 }
102