-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts-and-styles.php
81 lines (46 loc) · 1.79 KB
/
scripts-and-styles.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
<?php
function site_scripts_and_styles() {
if (!is_admin()) {
/**
* jQuery
**/
wp_deregister_script('jquery');
wp_enqueue_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js", array(), false, true);
/**
* modernizr
**/
// modernizr (without media query polyfill)
//wp_enqueue_script( 'site-modernizr', get_stylesheet_directory_uri() . '/library/js/libs/modernizr.custom.min.js', array(), '2.5.3', false );
/**
* Foundation
**/
wp_enqueue_style( 'foundation', get_stylesheet_directory_uri() . '/assets/dist/vendor.css', array(), 'v'.filemtime(get_stylesheet_directory() . '/assets/dist/vendor.css'), 'all' );
/**
* Site.css
**/
$v = 'v'.filemtime(get_stylesheet_directory() . '/assets/dist/site.css');
wp_enqueue_style( 'site', get_stylesheet_directory_uri() . '/assets/dist/site.css', array('foundation'), $v);
/**
* Styles.css
**/
//wp_enqueue_style( 'theme', get_stylesheet_directory_uri() . '/style.css', array('site'), filemtime(get_stylesheet_directory() . '/style.css'), 'all' );
/**
* ie-only style sheet
**/
wp_enqueue_style( 'ie-only', get_stylesheet_directory_uri() . '/assets/dist/ie.css', array(), '' );
if ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) {
wp_enqueue_script( 'comment-reply' );
}
//adding scripts file in the footer
wp_enqueue_script( 'site-js', get_stylesheet_directory_uri() . '/assets/dist/all.js', array( 'jquery' ), '', true );
// enqueue styles and scripts
// wp_enqueue_script( 'site-modernizr' );
// wp_enqueue_style( 'foundation' );
// wp_enqueue_style( 'site' );
// wp_enqueue_style( 'theme' );
// wp_enqueue_style('ie-only');
//wp_enqueue_script( 'jquery' );
//wp_enqueue_script( 'site-js' );
}
}
?>