| @@ -1,0 +1,79 @@ | ||
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Envato Extension | |
| 4 | + * | |
| 5 | + * @package NotificationX\Extensions | |
| 6 | + */ | |
| 7 | + | |
| 8 | +namespace NotificationX\Extensions\Envato; | |
| 9 | + | |
| 10 | +use NotificationX\GetInstance; | |
| 11 | +use NotificationX\Extensions\Extension; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * Envato Extension | |
| 15 | + * @method static Envato get_instance($args = null) | |
| 16 | + */ | |
| 17 | +class Envato extends Extension { | |
| 18 | + /** | |
| 19 | + * Instance of Envato | |
| 20 | + * | |
| 21 | + * @var Envato | |
| 22 | + */ | |
| 23 | + use GetInstance; | |
| 24 | + | |
| 25 | + public $priority = 25; | |
| 26 | + public $id = 'envato'; | |
| 27 | + public $img = NOTIFICATIONX_ADMIN_URL . 'images/extensions/sources/envato.png'; | |
| 28 | + public $doc_link = 'https://notificationx.com/docs/envato-sales-notification'; | |
| 29 | + public $types = 'conversions'; | |
| 30 | + public $module = 'modules_envato'; | |
| 31 | + public $module_priority = 17; | |
| 32 | + public $is_pro = true; | |
| 33 | + public $version = '1.2.0'; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * Initially Invoked when initialized. | |
| 37 | + */ | |
| 38 | + public function __construct(){ | |
| 39 | + parent::__construct(); | |
| 40 | + } | |
| 41 | + | |
| 42 | + public function init_extension() | |
| 43 | + { | |
| 44 | + $this->title = __('Envato', 'notificationx'); | |
| 45 | + $this->module_title = __('Envato', 'notificationx'); | |
| 46 | + $this->popup = [ | |
| 47 | + "denyButtonText" => __("<a href='https://notificationx.com/docs/envato-sales-notification/' target='_blank'>More Info</a>", "notificationx"), | |
| 48 | + "confirmButtonText" => __("<a href='https://notificationx.com/#pricing' target='_blank'>Upgrade to PRO</a>", "notificationx"), | |
| 49 | + "html"=> __(' | |
| 50 | + <span>A resourceful online marketplace for digital assets and services.</span> | |
| 51 | + <iframe id="email_subscription_video" type="text/html" allowfullscreen width="450" height="235" | |
| 52 | + src="https://www.youtube.com/embed/-df_6KHgr7I"> | |
| 53 | + </iframe> | |
| 54 | + ', 'notificationx') | |
| 55 | + ]; | |
| 56 | + } | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * Get data for Envato Extension. | |
| 60 | + * | |
| 61 | + * @param array $args Settings arguments. | |
| 62 | + * @return array | |
| 63 | + */ | |
| 64 | + public function get_data( $args = array() ){ | |
| 65 | + return 'Hello From Custom Notification'; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public function doc(){ | |
| 69 | + /* translators: %1$s: created & signed in to Envato account link URL, %2$s: documentation link URL, %3$s: Watch video tutorial link URL, %4$s: Integration with Envato link URL */ | |
| 70 | + return sprintf(__('<p>Make sure that you have <a target="_blank" href="%1$s">created & signed in to Envato account</a> to use its campaign & product sales data. For further assistance, check out our step by step <a target="_blank" href="%2$s">documentation</a>.</p> | |
| 71 | + <p>🎦 <a target="_blank" href="%3$s">Watch video tutorial</a> to learn quickly</p> | |
| 72 | + <p>👉 NotificationX <a target="_blank" href="%4$s">Integration with Envato</a></p>', 'notificationx'), | |
| 73 | + 'https://account.envato.com/sign_in?to=envato-api', | |
| 74 | + 'https://notificationx.com/docs/envato-sales-notification/', | |
| 75 | + 'https://youtu.be/-df_6KHgr7I', | |
| 76 | + 'https://notificationx.com/integrations/envato/' | |
| 77 | + ); | |
| 78 | + } | |
| 79 | +} | |