-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathai-provider-for-github-models.php
More file actions
44 lines (37 loc) · 1.29 KB
/
Copy pathai-provider-for-github-models.php
File metadata and controls
44 lines (37 loc) · 1.29 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
<?php
/**
* Plugin Name: AI Provider for GitHub Models
* Plugin URI: https://github.com/ernilambar/ai-provider-for-github-models
* Description: AI Provider for GitHub Models for the WordPress AI Client.
* Requires at least: 7.0
* Requires PHP: 7.4
* Version: 1.0.2
* Author: Nilambar Sharma
* Author URI: https://nilambar.net
* License: GPL-2.0-or-later
* License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
* Text Domain: ai-provider-for-github-models
* Domain Path: /languages
*
* @package Nilambar\AiProviderForGithubModels
*/
declare( strict_types=1 );
namespace Nilambar\AiProviderForGithubModels;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'AI_PROVIDER_FOR_GITHUB_MODELS_VERSION', '1.0.2' );
define( 'AI_PROVIDER_FOR_GITHUB_MODELS_BASE_NAME', basename( __DIR__ ) );
define( 'AI_PROVIDER_FOR_GITHUB_MODELS_BASE_FILEPATH', __FILE__ );
define( 'AI_PROVIDER_FOR_GITHUB_MODELS_BASE_FILENAME', plugin_basename( __FILE__ ) );
define( 'AI_PROVIDER_FOR_GITHUB_MODELS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
add_action(
'plugins_loaded',
static function () {
if ( ! file_exists( AI_PROVIDER_FOR_GITHUB_MODELS_PLUGIN_DIR . 'vendor/autoload.php' ) ) {
return;
}
require_once AI_PROVIDER_FOR_GITHUB_MODELS_PLUGIN_DIR . 'vendor/autoload.php';
( new Bootstrap() )->init();
}
);