-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathai.php
More file actions
77 lines (66 loc) · 1.69 KB
/
ai.php
File metadata and controls
77 lines (66 loc) · 1.69 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* AI
*
* @package ai
* @author WordPress.org Contributors
* @copyright 2025 Plugin Contributors
* @license GPL-2.0-or-later
*
* @wordpress-plugin
* Plugin Name: AI
* Plugin URI: https://github.com/WordPress/ai
* Description: AI features, experiments and capabilities for WordPress.
* Version: 0.7.0
* Requires at least: 7.0
* Requires PHP: 7.4
* Author: WordPress.org Contributors
* Author URI: https://make.wordpress.org/ai/
* License: GPL-2.0-or-later
* License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
* Text Domain: ai
*/
declare(strict_types=1);
namespace WordPress\AI;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/**
* Define the plugin constants.
*/
function constants(): void {
/**
* Main plugin file path.
*/
if ( ! defined( 'WPAI_PLUGIN_FILE' ) ) {
define( 'WPAI_PLUGIN_FILE', __FILE__ );
}
/**
* Plugin version.
*/
if ( ! defined( 'WPAI_VERSION' ) ) {
define( 'WPAI_VERSION', '0.7.0' );
}
/**
* Plugin directory path.
*/
if ( ! defined( 'WPAI_PLUGIN_DIR' ) ) {
define( 'WPAI_PLUGIN_DIR', plugin_dir_path( WPAI_PLUGIN_FILE ) );
}
/**
* Plugin directory URL.
*/
if ( ! defined( 'WPAI_PLUGIN_URL' ) ) {
define( 'WPAI_PLUGIN_URL', plugin_dir_url( WPAI_PLUGIN_FILE ) );
}
/**
* Default ability category for the plugin.
*/
if ( ! defined( 'WPAI_DEFAULT_ABILITY_CATEGORY' ) ) {
define( 'WPAI_DEFAULT_ABILITY_CATEGORY', 'ai-experiments' );
}
// Define other plugin constants here as needed.
}
constants();
// Load the autoloader.
require_once WPAI_PLUGIN_DIR . 'includes/autoload.php';
\WordPress\AI\Main::get_instance();