-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
61 lines (53 loc) · 1.21 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
<?php
/**
* Functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Spotibox
*/
// Run autoload.
require 'vendor/autoload.php';
// REST API.
require_once 'inc/class-spotiboxsession.php';
// Admin pages.
require_once 'inc/class-spotiboxadmin.php';
// REST API.
require_once 'inc/class-spotiboxrest.php';
add_action(
'wp_enqueue_scripts',
function() {
// Google Fonts used by theme.
wp_enqueue_style(
'spotibox-google-font',
'https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;800&display=swap',
array(),
'1.0.0',
'all'
);
// Main stylesheet for theme.
wp_enqueue_style(
'spotibox-style',
get_template_directory_uri() . '/dist/style.css',
array(),
filemtime( get_template_directory() . '/dist/style.css' ),
'all'
);
// Vue.js.
wp_enqueue_script(
'vuejs',
get_template_directory_uri() . '/dist/vue.js',
array(),
filemtime( get_template_directory() . '/dist/vue.js' ),
true
);
// The theme app script.
wp_enqueue_script(
'spotibox-script',
get_template_directory_uri() . '/dist/script.js',
array( 'vuejs' ),
filemtime( get_template_directory() . '/dist/script.js' ),
true
);
}
);