-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
78 lines (63 loc) · 2.56 KB
/
index.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* @link https://www.steinrein.com/
* @since 1.0.0
* @package Steinrein_Partner_Toolkit_WP
* @author Bastian Fießinger
*
* @wordpress-plugin
* Plugin Name: SteinRein Partner Toolkit
* Plugin URI: https://www.steinrein.com/
* Description: Display various aspects of your SteinRein Partnership in your WordPress site.
* Version: 1.0.0
* Author: SteinRein
* Author URI: https://www.steinrein.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: steinrein-toolkit
* Domain Path: /languages
*/
namespace SteinRein\Partner;
// Make sure this file runs only from within WordPress.
defined( 'ABSPATH' ) or die();
final class WebsiteToolkit
{
function __construct() {
$this->init();
}
function init() {
$this->define_constants();
$this->load_files();
(new Settings())->init();
(new Modules\Certificate())->init();
(new Modules\InquiryForm())->init();
(new Updater())->register();
}
function define_constants() {
if (!defined('STEINREIN_PARTNER_TOOLKIT_PLUGIN_VERSION')) {
define('STEINREIN_PARTNER_TOOLKIT_PLUGIN_VERSION', '1.0.0');
}
if (!defined('STEINREIN_PARTNER_TOOLKIT_PLUGIN_DIR')) {
define('STEINREIN_PARTNER_TOOLKIT_PLUGIN_DIR', plugin_dir_path(__FILE__));
}
if (!defined('STEINREIN_PARTNER_TOOLKIT_PLUGIN_URL')) {
define('STEINREIN_PARTNER_TOOLKIT_PLUGIN_URL', plugin_dir_url(__FILE__));
}
if (!defined('STEINREIN_PARTNER_TOOLKIT_PLUGIN_FILE')) {
define('STEINREIN_PARTNER_TOOLKIT_PLUGIN_FILE', __FILE__);
}
if (!defined('STEINREIN_PARTNER_TOOLKIT_PLUGIN_BASENAME')) {
define('STEINREIN_PARTNER_TOOLKIT_PLUGIN_BASENAME', plugin_basename(__FILE__));
}
if (!defined('STEINREIN_PARTNER_TOOLKIT_PLUGIN_DIR_BASENAME')) {
define('STEINREIN_PARTNER_TOOLKIT_PLUGIN_DIR_BASENAME', plugin_basename(__DIR__));
}
}
function load_files() {
require_once plugin_dir_path( __FILE__ ) . 'inc/class-settings.php';
require_once plugin_dir_path( __FILE__ ) . 'inc/modules/class-certificate.php';
require_once plugin_dir_path( __FILE__ ) . 'inc/modules/class-inquiry-form.php';
require_once plugin_dir_path( __FILE__ ) . 'inc/class-updater.php';
}
}
new WebsiteToolkit();