-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCountdownTimerModule.php
More file actions
127 lines (110 loc) · 2.19 KB
/
CountdownTimerModule.php
File metadata and controls
127 lines (110 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
/**
* File for CountdownTimerModule class.
*
* @package SBFW
*/
namespace STOREGROWTH\SPSB\Modules\CountdownTimer;
use STOREGROWTH\SPSB\Interfaces\ModuleSkeleton;
use STOREGROWTH\SPSB\Traits\Singleton;
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* `Countdown Timer` module initiator class.
*/
class CountdownTimerModule implements ModuleSkeleton {
use Singleton;
/**
* Unique ID for a module.
*
* @return string
*/
public function get_id() {
return 'countdown-timer';
}
/**
* directory Name for a module.
*
* @return string
*/
public function get_dir() {
return 'SalesCountdown';
}
/**
* Icon for a module.
*
* @return string
*/
public function get_icon() {
return sgsb_modules_url( 'CountdownTimer/assets/images/countdown-timer.svg' );
}
/**
* Banner for a module.
*
* @return string
*/
public function get_banner() {
return sgsb_modules_url( 'CountdownTimer/assets/images/sales-countdown-module-img.webp' );
}
/**
* Unique name for a module.
*
* @return string
*/
public function get_name() {
return 'Countdown Timer';
}
/**
* Description for the module.
*
* @return string
*/
public function get_description() {
return 'Build anticipation. Countdown timers create excitement for upcoming sales events, enticing your audience.';
}
/**
* Category for a module.
*
* @return string
*/
public function get_module_category() {
return 'Stock';
}
/**
* Module activation function.
*
* @return void
*/
public function activate() {
// TODO: Implement activate() method.
}
/**
* Module deactivation function.
*
* @return void
*/
public function deactivate() {
// TODO: Implement deactivate() method.
}
/**
* Starting point of the module.
*
* @return void
*/
public function init() {
// Initialize necessary classes instance for countdown timer module.
Includes\EnqueueScript::instance();
Includes\CommonHooks::instance();
Includes\Ajax::instance();
/**
* Module initialized.
*
* @since 1.0.0
*/
do_action( 'storegrowth_countdown_timer_module_init' );
}
}
// Create object and return.
return CountdownTimerModule::instance();