# fluent-support/1.5.5/boot/app.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 1.5.5. 42 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/1.5.5/code/boot/app.php
- Raw: https://pluginprobe.com/plugins/fluent-support/1.5.5/raw/boot/app.php
- Modified: 2022-03-02T14:22:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-support/1.5.5/code/boot/app.php#L10-L20`.

```php
<?php

use FluentSupport\Framework\Foundation\Application;
use FluentSupport\App\Hooks\Handlers\ActivationHandler;
use FluentSupport\App\Hooks\Handlers\DeactivationHandler;

return function ($file) {

    register_activation_hook($file, function () {
        (new ActivationHandler)->handle();
    });

    register_deactivation_hook($file, function () {
        (new DeactivationHandler)->handle();
    });

    add_action('plugins_loaded', function () use ($file) {
        $application = new Application($file);
        do_action('fluent_support_loaded', $application);
        do_action('fluent_support_addons_loaded', $application);

        add_action('init', function () {
            load_plugin_textdomain('fluent-support', false, 'fluent-support/language/');
        });

        add_action('fluent_support/admin_app_loaded', function () {
            if (!wp_next_scheduled('fluent_support_hourly_tasks')) {
                wp_schedule_event(time(), 'hourly', 'fluent_support_hourly_tasks');
            }

            if (!wp_next_scheduled('fluent_support_daily_tasks')) {
                wp_schedule_event(time(), 'daily', 'fluent_support_daily_tasks');
            }

            if (!wp_next_scheduled('fluent_support_weekly_tasks')) {
                wp_schedule_event(time(), 'weekly', 'fluent_support_weekly_tasks');
            }
        });

    });
};

```
