| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentSupport\App\Hooks\Handlers; |
| 4 |
|
| 5 |
use FluentSupport\Database\DBMigrator; |
| 6 |
|
| 7 |
class ActivationHandler |
| 8 |
{ |
| 9 |
public function handle($network_wide = false) |
| 10 |
{ |
| 11 |
DBMigrator::run($network_wide); |
| 12 |
|
| 13 |
if (! wp_next_scheduled ( 'fluent_support_hourly_tasks' )) { |
| 14 |
wp_schedule_event( time(), 'hourly', 'fluent_support_hourly_tasks' ); |
| 15 |
} |
| 16 |
|
| 17 |
if (! wp_next_scheduled ( 'fluent_support_daily_tasks' )) { |
| 18 |
wp_schedule_event( time(), 'daily', 'fluent_support_daily_tasks' ); |
| 19 |
} |
| 20 |
|
| 21 |
if (! wp_next_scheduled ( 'fluent_support_weekly_tasks' )) { |
| 22 |
wp_schedule_event( time(), 'weekly', 'fluent_support_weekly_tasks' ); |
| 23 |
} |
| 24 |
} |
| 25 |
} |
| 26 |
|