| 1 |
<?php |
| 2 |
/** |
| 3 |
* Exit Intent Popup Notification Type |
| 4 |
* |
| 5 |
* @package NotificationX\Types |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace NotificationX\Types; |
| 9 |
|
| 10 |
use NotificationX\Extensions\GlobalFields; |
| 11 |
use NotificationX\GetInstance; |
| 12 |
|
| 13 |
/** |
| 14 |
* Exit Intent Popup notification type. |
| 15 |
* @method static ExitIntent get_instance($args = null) |
| 16 |
*/ |
| 17 |
class ExitIntent extends Types { |
| 18 |
use GetInstance; |
| 19 |
|
| 20 |
public $priority = 17; |
| 21 |
public $is_pro = false; |
| 22 |
public $module = ['modules_exit_intent']; |
| 23 |
public $default_source = 'exit_intent_custom'; |
| 24 |
public $default_theme = 'exit_intent_theme-one'; |
| 25 |
public $link_type = 'none'; |
| 26 |
|
| 27 |
public function __construct() { |
| 28 |
parent::__construct(); |
| 29 |
$this->id = 'exit_intent'; |
| 30 |
} |
| 31 |
|
| 32 |
public function init() { |
| 33 |
parent::init(); |
| 34 |
$this->title = __( 'Exit Intent Popup', 'notificationx' ); |
| 35 |
$this->dashboard_title = __( 'Exit Intent Popup', 'notificationx' ); |
| 36 |
|
| 37 |
$this->themes = [ |
| 38 |
'theme-one' => [ |
| 39 |
'source' => NOTIFICATIONX_ADMIN_URL . 'images/themes/theme-blank.jpg', |
| 40 |
'image_shape' => 'circle', |
| 41 |
'template' => [ |
| 42 |
'first_param' => 'tag_name', |
| 43 |
'custom_first_param' => __( 'Someone', 'notificationx' ), |
| 44 |
'second_param' => __( 'is about to leave', 'notificationx' ), |
| 45 |
'third_param' => 'tag_title', |
| 46 |
'custom_third_param' => __( 'Check this out', 'notificationx' ), |
| 47 |
'fourth_param' => 'tag_time', |
| 48 |
'custom_fourth_param' => __( 'Just now', 'notificationx' ), |
| 49 |
], |
| 50 |
], |
| 51 |
]; |
| 52 |
|
| 53 |
$this->templates = [ |
| 54 |
'exit_intent_template_default' => [ |
| 55 |
'first_param' => GlobalFields::get_instance()->common_name_fields(), |
| 56 |
'third_param' => [ |
| 57 |
'tag_title' => __( 'Item Title', 'notificationx' ), |
| 58 |
], |
| 59 |
'fourth_param' => [ |
| 60 |
'tag_time' => __( 'Time', 'notificationx' ), |
| 61 |
], |
| 62 |
'_themes' => [ |
| 63 |
'exit_intent_theme-one', |
| 64 |
], |
| 65 |
], |
| 66 |
]; |
| 67 |
} |
| 68 |
} |
| 69 |
|