PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / 3.3.1
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar v3.3.1
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 / Elementor / From.php

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

86 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Envato Extension
4 *
5 * @package NotificationX\Extensions
6 */
7
8 namespace NotificationX\Extensions\Elementor;
9
10 use NotificationX\Core\Rules;
11 use NotificationX\GetInstance;
12 use NotificationX\Extensions\Extension;
13
14 /**
15 * Envato Extension
16 * @method static From get_instance($args = null)
17 */
18 class From extends Extension {
19 /**
20 * Instance of Envato
21 *
22 * @var Envato
23 */
24 use GetInstance;
25
26 public $priority = 25;
27 public $id = 'elementor_form';
28 // public $img = NOTIFICATIONX_ADMIN_URL . 'images/extensions/sources/envato.png';
29 public $doc_link = 'https://notificationx.com/docs/elementor-form-with-notificationx/';
30 public $types = 'form';
31 public $module = 'elementor_form';
32 public $module_priority = 17;
33 public $is_pro = true;
34 public $class = 'ElementorPro\Modules\Forms\Submissions\Database\Repositories\Form_Snapshot_Repository';
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 = __('Elementor Form', 'notificationx');
46 $this->module_title = __('Elementor', 'notificationx');
47 $this->popup = [
48 "denyButtonText" => __("<a href='https://notificationx.com/docs/elementor-form-with-notificationx/' target='_blank'>More Info</a>", "notificationx"),
49 "confirmButtonText" => __("<a href='https://notificationx.com/#pricing' target='_blank'>Upgrade to PRO</a>", "notificationx"),
50 // phpcs:ignore WordPress.WP.I18n.NoHtmlWrappedStrings -- Reviewed for the NotificationX codebase: acceptable in this context.
51 "html"=> __('
52 <span>Elementor forms that can help you keep important leads and stay in touch with your customers.</span>
53 ', 'notificationx')
54 ];
55 }
56
57 public function source_error_message($messages) {
58 if (!$this->class_exists()) {
59 $url = "https://elementor.com/";
60 $messages[$this->id] = [
61 'message' => sprintf( '%s <a href="%s" target="_blank">%s</a> %s',
62 __( 'You have to install', 'notificationx' ),
63 $url,
64 __( 'Elementor Pro', 'notificationx' ),
65 __( 'plugin first.', 'notificationx' )
66 ),
67 'html' => true,
68 'type' => 'error',
69 'rules' => Rules::is('source', $this->id),
70 ];
71 }
72 return $messages;
73 }
74
75 public function doc(){
76 // translators: links
77 return sprintf(__('<p>Make sure that you have <a target="_blank" href="%1$s">Elementor Pro installed & configured</a> to use its form submission data. For further assistance, check out our step by step <a target="_blank" href="%2$s">documentation</a>.</p>
78 <p><strong>Recommended Blog:</strong></p>
79 <p>🔥 Hacks to Increase Your <a target="_blank" href="%3$s">WordPress Contact Forms Submission Rate</a> Using NotificationX</p>', 'notificationx'),
80 'https://elementor.com/',
81 'https://notificationx.com/docs/elementor-form-with-notificationx/',
82 'https://notificationx.com/blog/wordpress-contact-forms/'
83 );
84 }
85 }
86