-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
117 lines (95 loc) · 3.37 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
/**
* @Packge : Colorlib
* @Version : 1.0
* @Author : Colorlib
* @Author URI : http://colorlib.com/wp/
*
*/
// Block direct access
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
/**
*
* Define constant
*
*/
// Base URI
if ( ! defined( 'SUNSHINE_DIR_URI' ) ) {
define( 'SUNSHINE_DIR_URI', get_template_directory_uri() . '/' );
}
// assets URI
if ( ! defined( 'SUNSHINE_DIR_ASSETS_URI' ) ) {
define( 'SUNSHINE_DIR_ASSETS_URI', SUNSHINE_DIR_URI . 'assets/' );
}
// Css File URI
if ( ! defined( 'SUNSHINE_DIR_CSS_URI' ) ) {
define( 'SUNSHINE_DIR_CSS_URI', SUNSHINE_DIR_ASSETS_URI . 'css/' );
}
// Js File URI
if ( ! defined( 'SUNSHINE_DIR_JS_URI' ) ) {
define( 'SUNSHINE_DIR_JS_URI', SUNSHINE_DIR_ASSETS_URI . 'js/' );
}
// Images URI
if ( ! defined( 'SUNSHINE_DIR_IMGS_URI' ) ) {
define( 'SUNSHINE_DIR_IMGS_URI', SUNSHINE_DIR_ASSETS_URI . 'img/' );
}
// Icon Images
if ( ! defined( 'SUNSHINE_DIR_ICON_IMG_URI' ) ) {
define( 'SUNSHINE_DIR_ICON_IMG_URI', SUNSHINE_DIR_ASSETS_URI . 'img/icon/' );
}
// Base Directory
if ( ! defined( 'SUNSHINE_DIR_PATH' ) ) {
define( 'SUNSHINE_DIR_PATH', get_parent_theme_file_path() . '/' );
}
//Inc Folder Directory
if ( ! defined( 'SUNSHINE_DIR_PATH_INC' ) ) {
define( 'SUNSHINE_DIR_PATH_INC', SUNSHINE_DIR_PATH . 'inc/' );
}
//Sunshine Libraries Folder Directory
if ( ! defined( 'SUNSHINE_DIR_PATH_LIBS' ) ) {
define( 'SUNSHINE_DIR_PATH_LIBS', SUNSHINE_DIR_PATH_INC . 'libraries/' );
}
//Classes Folder Directory
if ( ! defined( 'SUNSHINE_DIR_PATH_CLASSES' ) ) {
define( 'SUNSHINE_DIR_PATH_CLASSES', SUNSHINE_DIR_PATH_INC . 'classes/' );
}
//Hooks Folder Directory
if ( ! defined( 'SUNSHINE_DIR_PATH_HOOKS' ) ) {
define( 'SUNSHINE_DIR_PATH_HOOKS', SUNSHINE_DIR_PATH_INC . 'hooks/' );
}
// Admin Enqueue script
function sunshine_admin_script(){
wp_enqueue_style( 'sunshine-admin', get_template_directory_uri().'/assets/css/sunshine-admin.css', false, '1.0.0' );
wp_enqueue_script( 'sunshine_admin', get_template_directory_uri().'/assets/js/sunshine-admin.js', false, '1.0.0' );
}
add_action( 'admin_enqueue_scripts', 'sunshine_admin_script' );
/**
* Include File
*
*/
require_once( SUNSHINE_DIR_PATH_INC . 'sunshine-breadcrumbs.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'sunshine-widgets-reg.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'wp_bootstrap_navwalker.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'post-like.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'sunshine-functions.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'sunshine-commoncss.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'support-functions.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'wp-html-helper.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'wp_bootstrap_pagination.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'customizer/customizer.php' );
require_once( SUNSHINE_DIR_PATH_CLASSES . 'Class-Enqueue.php' );
require_once( SUNSHINE_DIR_PATH_CLASSES . 'Class-Config.php' );
require_once( SUNSHINE_DIR_PATH_HOOKS . 'hooks.php' );
require_once( SUNSHINE_DIR_PATH_HOOKS . 'hooks-functions.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'class-epsilon-dashboard-autoloader.php' );
require_once( SUNSHINE_DIR_PATH_INC . 'class-epsilon-init-dashboard.php' );
/**
* Instantiate Sunshine object
*
* Inside this object:
* Enqueue scripts, Google font, Theme support features, Epsilon Dashboard .
*
*/
$Sunshine = new Sunshine();