-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
52 lines (48 loc) · 1.08 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
<?php
// Die if not WordPress
if (! defined('ABSPATH')) {
die();
}
/**
* Functions for SkyForge Theme
*/
/**
* Require compose autoloader
*
* @method skyforgeRequireComposerAutoloader
*
* @since 0.1.0
*
* @return null
*/
function skyforgeRequireComposerAutoloader()
{
if (file_exists(ABSPATH . "/wp-content/vendor/autoload.php")) {
require_once ABSPATH . "/wp-content/vendor/autoload.php";
return;
}
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
return;
}
}
skyforgeRequireComposerAutoloader();
/**
* Enqueue Static Assets
*
* @method skyforgeEnqueueStylesheets
*
* @since 0.1.0
*
* @return none
*/
function skyforgeEnqueueStylesheets()
{
// Parent
wp_enqueue_style('skyforge-style', get_template_directory_uri() . '/style.css');
// Child
if (file_exists(get_stylesheet_directory() . '/style.css')) {
wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css');
}
}
add_action('wp_enqueue_scripts', 'skyforgeEnqueueStylesheets');