-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwp-oop-base.php
More file actions
35 lines (29 loc) · 1.17 KB
/
wp-oop-base.php
File metadata and controls
35 lines (29 loc) · 1.17 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
<?php
/**
* Plugin Name: WP OOP Base
* Description: Opinionated OOP base for WordPress plugin and theme development.
* Version: 2.0.1
* Author: WP+ (https://github.com/wp-plus)
*
* If you want to use this plugin as a must-use plugin, please move this file to the "mu-plugins" folder (only this
* file, everything else should stay in the "plugins" folder).
*/
namespace WpPlus\WpOopBase;
// If this file is called directly, abort.
if (!defined('WPINC')) {
die;
}
// If you want to have this as a must-use plugin, simply copy or move this file from the regular "plugins/wp-oop-base"
// folder to the "mu-plugins" folder. Everything else can (should) stay in the "plugins" folder, especially when using
// Composer for dependency management.
// Since this bootstrap file can be present in both the "mu-plugins" and the regular "plugins" folder, make sure we run
// it only once.
if (defined('WP_PLUS_WP_OOP_BASE_IS_LOADED')) {
return;
}
define('WP_PLUS_WP_OOP_BASE_IS_LOADED', TRUE);
// Ensure WP_PLUGIN_DIR is defined
if (!defined('WP_PLUGIN_DIR')) {
define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
}
require_once WP_PLUGIN_DIR . '/wp-oop-base/lib/autoload.php';