-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathclass-bluegreen.php
41 lines (34 loc) · 927 Bytes
/
class-bluegreen.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
<?php
/**
* Main theme class
*
* @package Bluegreen
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Bluegreen {
/**
* Bluegreen constructor.
*/
function __construct() {
// Define any necessary constants, namespaced properly.
static::defines();
// Run the base class constructor.
add_action( 'after_setup_theme', array( get_called_class(), 'run' ) );
// Add the actions needed for the following classes that can't run via `after_setup_theme`.
new Bluegreen\Customizer();
new Bluegreen\Extras();
new Bluegreen\Template_Tags();
// new Bluegreen\Jetpack();
}
static function run() {
// Instantiate the base class that will load everything that needs to run on setup.
new Bluegreen\Base();
}
static function defines() {
// dynamically pull the theme version right from the stylesheet
$theme_info = wp_get_theme();
define( 'Bluegreen\\VERSION', $theme_info->get( 'Version' ) );
}
}