-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
57 lines (34 loc) · 1.3 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
<?php
/* Setup Theme
-------------------------------------------------------- */
if(!function_exists('wordstrap_setup_theme')) {
function wordstrap_setup_theme() {
// Custom menu
register_nav_menu( 'header', __( 'Primary Menu', 'wordstrap' ) );
}
}
require_once get_template_directory() . '/nav-walker.php';
add_action('after_setup_theme', 'wordstrap_setup_theme');
/* Javascript
-------------------------------------------------------- */
if(! function_exists('wordstrap_scripts') ) {
function wordstrap_scripts() {
wp_enqueue_script('wordstrap-jquery', get_template_directory_uri() .'/assets/js/jquery.min.js', null, true );
wp_enqueue_script('wordstrap-bootstrap-js', get_template_directory_uri() .'/assets/js/bootstrap.bundle.min.js', null, true );
}
}
add_action('wp_enqueue_scripts', 'wordstrap_scripts');
/* CSS
-------------------------------------------------------- */
if(! function_exists('wordstrap_styles') ) {
function wordstrap_styles() {
wp_enqueue_style('custom-wordstrap-css', get_template_directory_uri() .'/assets/css/custom.min.css');
}
}
add_action('wp_enqueue_scripts', 'wordstrap_styles');
// SVG file upload permission
add_filter( 'upload_mimes', function ( $mimes = array() ) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
} );
?>