PluginProbe ʕ •ᴥ•ʔ
AI Agent by SiteGround / trunk
AI Agent by SiteGround vtrunk
1.2.1 1.2.0 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 trunk 1.1.3
sg-ai-studio / sg-ai-studio.php
sg-ai-studio Last commit date
assets 1 day ago core 14 hours ago languages 1 day ago src-js 1 month ago vendor 14 hours ago composer.json 14 hours ago composer.lock 14 hours ago react-strings.php 1 month ago readme.txt 14 hours ago sg-ai-studio.php 14 hours ago
sg-ai-studio.php
70 lines
1 <?php
2 /**
3 * AI Agent by SiteGround
4 *
5 * @package AI Agent by SiteGround
6 * @author SiteGround
7 * @link http://www.siteground.com/
8 *
9 * @wordpress-plugin
10 * Plugin Name: AI Agent by SiteGround
11 * Plugin URI: https://siteground.com
12 * Description: Manage your WordPress site with AI - create content, install plugins, and perform site management tasks effortlessly.
13 * Version: 1.2.2
14 * Author: SiteGround
15 * Author URI: https://www.siteground.com
16 * Text Domain: sg-ai-studio
17 * Domain Path: /languages
18 * License: GPLv3
19 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
20 */
21
22 // Our namespace.
23 namespace SG_AI_Studio;
24
25 use SG_AI_Studio\Loader\Loader;
26 use SG_AI_Studio\Activator\Activator;
27
28
29 // If this file is called directly, abort.
30 if ( ! defined( 'WPINC' ) ) {
31 die;
32 }
33
34 // Define version constant.
35 if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
36 define( __NAMESPACE__ . '\VERSION', '1.2.2' );
37 }
38
39 // Define slug constant.
40 if ( ! defined( __NAMESPACE__ . '\PLUGIN_SLUG' ) ) {
41 define( __NAMESPACE__ . '\PLUGIN_SLUG', 'sg-ai-studio' );
42 }
43
44 // Define root directory.
45 if ( ! defined( __NAMESPACE__ . '\DIR' ) ) {
46 define( __NAMESPACE__ . '\DIR', __DIR__ );
47 }
48
49 // Define root URL.
50 if ( ! defined( __NAMESPACE__ . '\URL' ) ) {
51 $sg_ai_studio_root_url = \trailingslashit( DIR );
52
53 // Sanitize directory separator on Windows.
54 $sg_ai_studio_root_url = str_replace( '\\', '/', $sg_ai_studio_root_url );
55
56 $sg_ai_studio_plugin_dir = str_replace( '\\', '/', WP_PLUGIN_DIR );
57 $sg_ai_studio_root_url = str_replace( $sg_ai_studio_plugin_dir, \plugins_url(), $sg_ai_studio_root_url );
58
59 define( __NAMESPACE__ . '\URL', \untrailingslashit( $sg_ai_studio_root_url ) );
60
61 unset( $sg_ai_studio_root_url, $sg_ai_studio_plugin_dir );
62 }
63
64 require \SG_AI_Studio\DIR . '/vendor/autoload.php';
65
66 register_activation_hook( __FILE__, array( new Activator(), 'activate' ) );
67
68 // Initialize the loader.
69 $sg_ai_studio = new Loader();
70