Repository navigation
Expand file tree
/
Copy pathplugin-infrastructure.php
More file actions
89 lines (77 loc) · 2.75 KB
/
Copy pathplugin-infrastructure.php
File metadata and controls
89 lines (77 loc) · 2.75 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
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* Plugin Infrastructure
*
* @package Plugin Infrastructure
* @author Mayank Majeji
* @license gplv2
* @version 1.0.0
*
* @wordpress-plugin
* Plugin Name: Plugin Infrastructure
* Plugin URI: https://wordpress.org/plugins/plugin-infrastructure/
* Description: Allows you to remove unused resources and improve speed and performance of your WordPress website
* Version: 1.0.0
* Author: Mayank Majeji
* Author URI: https://mayankmajeji.com/
* Text Domain: plugin-infrastructure
* Domain Path: languages
* License: GPLv2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* You should have received a copy of the GNU General Public License
* along with Plugin Infrastructure. If not, see <http://www.gnu.org/licenses/>.
*
* Plugin Infrastructure is distributed under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* any later version.
*
* Plugin Infrastructure is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
if (! defined('ABSPATH')) {
exit; // Exit if accessed directly.
}
/**
* HELPER COMMENT START
*
* This file contains the main information about the plugin.
* It is used to register all components necessary to run the plugin.
*
* The comment above contains all information about the plugin
* that are used by WordPress to differenciate the plugin and register it properly.
* It also contains further PHPDocs parameter for a better documentation
*
* The function TEST() is the main function that you will be able to
* use throughout your plugin to extend the logic. Further information
* about that is available within the sub classes.
*
* HELPER COMMENT END
*/
// Plugin name.
define('PLUGIN_INFRASTRUCTURE_NAME', 'Plugin Infrastructure');
// Plugin version.
define('PLUGIN_INFRASTRUCTURE_VERSION', '1.0.0');
// Plugin Root File.
define('PLUGIN_INFRASTRUCTURE_FILE', __FILE__);
// Plugin base.
define('PLUGIN_INFRASTRUCTURE_BASE', plugin_basename(PLUGIN_INFRASTRUCTURE_FILE));
// Plugin Folder Path.
define('PLUGIN_INFRASTRUCTURE_DIR', plugin_dir_path(PLUGIN_INFRASTRUCTURE_FILE));
// Plugin Folder URL.
define('PLUGIN_INFRASTRUCTURE_URL', plugin_dir_url(PLUGIN_INFRASTRUCTURE_FILE));
/**
* Load the main class for the core functionality
*/
require_once PLUGIN_INFRASTRUCTURE_DIR . 'core/class-plugin-infrastructure.php';
/**
* The main function to load the only instance
* of our master class.
*/
function PLUGIN_INFRASTRUCTURE()
{
return Plugin_Infrastructure::instance();
}
PLUGIN_INFRASTRUCTURE();