| 1 |
<?php |
| 2 |
//if accessed directly exit |
| 3 |
if(!defined( 'ABSPATH' )) exit; |
| 4 |
|
| 5 |
use FluentBoards\Framework\Foundation\Application; |
| 6 |
use FluentBoards\App\Hooks\Handlers\ActivationHandler; |
| 7 |
use FluentBoards\App\Hooks\Handlers\DeactivationHandler; |
| 8 |
use FluentBoards\App\Services\Intergrations\FluentCRM\Init; |
| 9 |
|
| 10 |
|
| 11 |
return function ($file) { |
| 12 |
$app = new Application($file); |
| 13 |
require_once FLUENT_BOARDS_PLUGIN_PATH . 'app/Functions/helpers.php'; |
| 14 |
|
| 15 |
register_activation_hook($file, function () use ($app) { |
| 16 |
($app->make(ActivationHandler::class))->handle(); |
| 17 |
}); |
| 18 |
|
| 19 |
register_deactivation_hook($file, function () use ($app) { |
| 20 |
($app->make(DeactivationHandler::class))->handle(); |
| 21 |
}); |
| 22 |
|
| 23 |
require_once FLUENT_BOARDS_PLUGIN_PATH . 'vendor/woocommerce/action-scheduler/action-scheduler.php'; |
| 24 |
|
| 25 |
add_action('plugins_loaded', function () use ($app) { |
| 26 |
do_action('fluent_boards_loaded', $app); |
| 27 |
}); |
| 28 |
|
| 29 |
add_action('fluentcrm_loaded', function () { |
| 30 |
new \FluentBoards\App\Services\Intergrations\FluentCRM\Init(); |
| 31 |
}); |
| 32 |
|
| 33 |
add_action('fluentform/loaded', function ($app) { |
| 34 |
new \FluentBoards\App\Services\Intergrations\FluentFormIntegration\Bootstrap($app); |
| 35 |
}); |
| 36 |
|
| 37 |
}; |
| 38 |
|