File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace AmpProject \AmpWP \BackgroundTask ;
9
9
10
- use AmpProject \AmpWP \Infrastructure \Conditional ;
11
10
use AmpProject \AmpWP \Infrastructure \Registerable ;
12
11
use AmpProject \AmpWP \Infrastructure \Service ;
13
12
18
17
* @since 2.0
19
18
* @internal
20
19
*/
21
- abstract class CronBasedBackgroundTask implements Service, Registerable, Conditional {
20
+ abstract class CronBasedBackgroundTask implements Service, Registerable {
22
21
23
22
const DEFAULT_INTERVAL_HOURLY = 'hourly ' ;
24
23
const DEFAULT_INTERVAL_TWICE_DAILY = 'twicedaily ' ;
@@ -40,15 +39,6 @@ public function __construct( BackgroundTaskDeactivator $background_task_deactiva
40
39
$ this ->background_task_deactivator = $ background_task_deactivator ;
41
40
}
42
41
43
- /**
44
- * Check whether the conditional object is currently needed.
45
- *
46
- * @return bool Whether the conditional object is needed.
47
- */
48
- public static function is_needed () {
49
- return is_admin () || wp_doing_cron ();
50
- }
51
-
52
42
/**
53
43
* Register the service with the system.
54
44
*
You can’t perform that action at this time.
0 commit comments