-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
85 lines (47 loc) · 1.43 KB
/
functions.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
79
80
81
82
83
84
85
<?php
/**
* Functions
* @package justbootstrap
* @author Nick Courage
* @copyright 2019, virtuswebmedia
* @link https://www.virtuswebmedia.com
* @since Version 1.0.0
*/
define( 'JSB_CSS', get_template_directory_uri() . '/css/' );
define( 'JSB_JS', get_template_directory_uri() . '/js/' );
class JustBootstrap{
private static $instance;
public static function instance(){
if( ! isset( self::$instance ) && ! ( self::$instance instanceof JustBootstrap ) ){
self::$instance = new self;
}
return self::$instance;
}
public function __construct(){
$this->jsb_includes();
$this->jsb_setup();
}
public function jsb_includes(){
$this->files = array(
'template/class-template.php'
);
foreach( $this->files as $file ){
require_once( get_template_directory() . '/inc/' . $file );
}
}
private function jsb_setup(){
$this->template = new JustBootstrap_Template();
add_action( 'after_setup_theme', array( $this, 'jsb_theme_setup') );
}
public function jsb_theme_setup(){
// register nav menus
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'justbootstrap' )
) );
add_theme_support( 'custom-logo' );
}
}
function justbootstrap(){
return JustBootstrap::instance();
}
justbootstrap();