-
Notifications
You must be signed in to change notification settings - Fork 0
/
wordpress-plugin-boilerplate.php
61 lines (53 loc) · 1.66 KB
/
wordpress-plugin-boilerplate.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
<?php
/**
* Plugin Name: WordPress Plugin Boilerplate
* Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
* Version: 1.0.0
* Author: Sourov
* Author URI: https://sourov.im/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: plugin-name
*
* @package WPBP
*/
/*
WordPress Plugin Boilerplate is free software: you can redistribute it and/or modify
it 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.
WordPress Plugin Boilerplate 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.
You should have received a copy of the GNU General Public License
along with WordPress Plugin Boilerplate. If not, see http://www.gnu.org/licenses/gpl-2.0.txt.
*/
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Define plugin __FILE__
*/
if ( ! defined( 'WPBP_PLUGIN_FILE' ) ) {
define( 'WPBP_PLUGIN_FILE', __FILE__ );
}
/**
* Include necessary files to initial load of the plugin.
*/
if ( ! class_exists( 'WPBP\Bootstrap' ) ) {
require_once __DIR__ . '/includes/traits/trait-singleton.php';
require_once __DIR__ . '/includes/class-bootstrap.php';
}
/**
* Initialize the plugin functionality.
*
* @since 1.0.0
* @return WPBP\Bootstrap
*/
function wp_boilerplate_plugin() {
return WPBP\Bootstrap::instance();
}
// Call initialization function.
wp_boilerplate_plugin();