3
3
namespace NewfoldLabs \WP \Module \Onboarding \TaskManagers ;
4
4
5
5
use NewfoldLabs \WP \Module \Onboarding \Tasks \ImageSideloadTask ;
6
- use NewfoldLabs \WP \Module \Onboarding \Data \Options ;
7
6
8
7
/**
9
8
* Task Manager for Image Sideloading
@@ -17,14 +16,14 @@ class ImageSideloadTaskManager {
17
16
*
18
17
* @var string
19
18
*/
20
- const QUEUE_OPTION = 'nfd_image_sideload_queue ' ;
19
+ const QUEUE_OPTION = 'nfd_module_onboarding_image_sideload_queue ' ;
21
20
22
21
/**
23
22
* Option name for storing the processing status
24
23
*
25
24
* @var string
26
25
*/
27
- const STATUS_OPTION = 'nfd_image_sideload_status ' ;
26
+ const STATUS_OPTION = 'nfd_module_onboarding_image_sideload_status ' ;
28
27
29
28
/**
30
29
* Add a task to the queue
@@ -62,7 +61,7 @@ public static function add_to_queue( ImageSideloadTask $task ) {
62
61
* @return array
63
62
*/
64
63
public static function get_queue () {
65
- $ queue = get_option ( Options:: get_option_name ( self ::QUEUE_OPTION ) , array () );
64
+ $ queue = get_option ( self ::QUEUE_OPTION , array () );
66
65
if ( ! is_array ( $ queue ) ) {
67
66
$ queue = array ();
68
67
}
@@ -76,7 +75,7 @@ public static function get_queue() {
76
75
* @return void
77
76
*/
78
77
public static function set_queue ( $ queue ) {
79
- update_option ( Options:: get_option_name ( self ::QUEUE_OPTION ) , $ queue );
78
+ update_option ( self ::QUEUE_OPTION , $ queue );
80
79
}
81
80
82
81
/**
@@ -85,7 +84,7 @@ public static function set_queue( $queue ) {
85
84
* @return string
86
85
*/
87
86
public static function get_status () {
88
- return get_option ( Options:: get_option_name ( self ::STATUS_OPTION ) , 'idle ' );
87
+ return get_option ( self ::STATUS_OPTION , 'idle ' );
89
88
}
90
89
91
90
/**
@@ -95,7 +94,7 @@ public static function get_status() {
95
94
* @return void
96
95
*/
97
96
public static function set_status ( $ status ) {
98
- update_option ( Options:: get_option_name ( self ::STATUS_OPTION ) , $ status );
97
+ update_option ( self ::STATUS_OPTION , $ status );
99
98
}
100
99
101
100
/**
0 commit comments