← All changes
|
includes/Extensions/CustomNotification/CustomNotificationConversions.php
+78
-0
0.2.5.6
→
trunk
View file →
| @@ -1,0 +1,78 @@ | ||
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * CustomNotification Extension | |
| 4 | + * | |
| 5 | + * @package NotificationX\Extensions | |
| 6 | + */ | |
| 7 | + | |
| 8 | +namespace NotificationX\Extensions\CustomNotification; | |
| 9 | + | |
| 10 | +use NotificationX\GetInstance; | |
| 11 | +use NotificationX\Extensions\Extension; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * CustomNotification Extension | |
| 15 | + * @method static CustomNotificationConversions get_instance($args = null) | |
| 16 | + */ | |
| 17 | +class CustomNotificationConversions extends Extension { | |
| 18 | + /** | |
| 19 | + * Instance of CustomNotificationConversions | |
| 20 | + * | |
| 21 | + * @var CustomNotificationConversions | |
| 22 | + */ | |
| 23 | + use GetInstance; | |
| 24 | + | |
| 25 | + public $priority = 30; | |
| 26 | + public $id = 'custom_notification_conversions'; | |
| 27 | + public $img = NOTIFICATIONX_ADMIN_URL . 'images/extensions/sources/custom.png'; | |
| 28 | + public $doc_link = 'https://notificationx.com/docs/custom-notification'; | |
| 29 | + public $types = 'conversions'; | |
| 30 | + public $module = 'modules_custom_notification'; | |
| 31 | + public $module_priority = 13; | |
| 32 | + public $is_pro = true; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * Initially Invoked when initialized. | |
| 36 | + */ | |
| 37 | + public function __construct(){ | |
| 38 | + parent::__construct(); | |
| 39 | + } | |
| 40 | + | |
| 41 | + public function init_extension() | |
| 42 | + { | |
| 43 | + $this->title = __('Custom Notification', 'notificationx'); | |
| 44 | + $this->module_title = __('Custom Notification', 'notificationx'); | |
| 45 | + $this->popup = [ | |
| 46 | + "denyButtonText" => __("<a href='https://notificationx.com/docs/custom-notification/' target='_blank'>More Info</a>", "notificationx"), | |
| 47 | + "confirmButtonText" => __("<a href='https://notificationx.com/#pricing' target='_blank'>Upgrade to PRO</a>", "notificationx"), | |
| 48 | + "html"=> __(' | |
| 49 | + <span style="text-align:left;">Display custom conversion notifications as pop up.</span> | |
| 50 | + <iframe id="custom_notification_video" type="text/html" allowfullscreen width="450" height="235" | |
| 51 | + src="https://www.youtube.com/embed/OuTmDZ0_TEw"> | |
| 52 | + </iframe> | |
| 53 | + ', 'notificationx') | |
| 54 | + ]; | |
| 55 | + } | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * Get data for CustomNotification Extension. | |
| 59 | + * | |
| 60 | + * @param array $args Settings arguments. | |
| 61 | + * @return array | |
| 62 | + */ | |
| 63 | + public function get_data( $args = array() ){ | |
| 64 | + return 'Hello From Custom Notification'; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public function doc(){ | |
| 68 | + /* translators: %1$s: documentation link URL, %2$s: video tutorial link URL, %3$s: Display Custom Notification Alerts link URL */ | |
| 69 | + return sprintf(__('<p>You can make custom notification for its all types of campaign. For further assistance, check out our step by step <a target="_blank" href="%1$s">documentation</a>.</p> | |
| 70 | + <p>🎦 Watch <a target="_blank" href="%2$s">video tutorial</a> to learn quickly</p> | |
| 71 | + <p><strong>Recommended Blog:</strong></p> | |
| 72 | + <p>🔥 How to <a target="_blank" href="%3$s">Display Custom Notification Alerts</a> On Your Website Using NotificationX</p>', 'notificationx'), | |
| 73 | + 'https://notificationx.com/docs/custom-notification/', | |
| 74 | + 'https://www.youtube.com/watch?v=OuTmDZ0_TEw', | |
| 75 | + 'https://wpdeveloper.com/custom-notificationx-alert-fomo/' | |
| 76 | + ); | |
| 77 | + } | |
| 78 | +} | |