-
Notifications
You must be signed in to change notification settings - Fork 2
/
ssiplugin.php
49 lines (41 loc) · 1 KB
/
ssiplugin.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
<?php
/**
* @package SSIPlugin
* @version 0.0.1
* Plugin Name: SSI Plugin
* Plugin URI:
* Description: SSI Plugin for WordPress
* Author: Araneum
* Version: 0.0.1
* Author URI:
* Text Domain: ssiplugin
*/
//If the file is called directly, abort
defined('ABSPATH') or die();
//Require once the Composer Autoload
if (file_exists(dirname(__FILE__) . '/vendor/autoload.php')) {
require_once dirname(__FILE__) . '/vendor/autoload.php';
}
/**
* The code that runs during plugin activation
*/
function activate_ssiplugin()
{
\Inc\Base\Activate::activate();
}
/**
* The code that runs during plugin deactivation
*/
function deactivate_ssiplugin()
{
\Inc\Base\Deactivate::deactivate();
}
//Procedural way
register_activation_hook(__FILE__, 'activate_ssiplugin');
register_deactivation_hook(__FILE__, 'deactivate_ssiplugin');
/**
* Initialize all the core classes of the SSI plugin
*/
if (class_exists('Inc\\Init')) {
Inc\Init::registerServices();
}