-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagentwp.php
53 lines (47 loc) · 1.57 KB
/
agentwp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Plugin Name: AgentWP
* Plugin URI: https://agentwp.com
* Description: Adds a AI Agent to your WordPress installation.
* Version: 1.3.0
* Author: WPAI Inc.
* Author URI: https://wpai.co
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: agentwp
* Domain Path: /languages
* Requires at least: 6.4
* Requires PHP: 7.4
*/
defined('ABSPATH') || exit;
require_once __DIR__.'/autoload.php';
register_activation_hook(__FILE__, 'agentwp_boot_plugin');
register_deactivation_hook(__FILE__, 'agentwp_boot_plugin');
add_action('plugins_loaded', 'agentwp_boot_plugin');
/**
* Registers all the service providers
* with a Main dependency.
*/
function agentwp_boot_plugin(): void
{
$main = \WpAi\AgentWp\Main::getInstance(__FILE__);
$registry = (new \WpAi\AgentWp\ProviderRegistry($main));
$registry->register([
\WpAi\AgentWp\Installer::class,
\WpAi\AgentWp\Registry\Hooks::class,
\WpAi\AgentWp\Page\Admin\Settings::class,
\WpAi\AgentWp\Page\Admin\Chat::class,
\WpAi\AgentWp\Page\Frontend\Chat::class,
\WpAi\AgentWp\Registry\IndexSiteData::class,
\WpAi\AgentWp\Registry\IndexSiteSummary::class,
\WpAi\AgentWp\Registry\IndexThemeJson::class,
\WpAi\AgentWp\Registry\IndexSiteDocs::class,
\WpAi\AgentWp\Registry\Router::class,
\WpAi\AgentWp\Registry\WpUser::class,
]);
add_action('current_screen', function () use ($registry) {
$registry->register([
\WpAi\AgentWp\Page\Admin\DashboardWidget::class,
]);
});
}