-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
31 lines (25 loc) · 1.32 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
<?php
/* ==========================================================================
SCRIPTS, STYLESHEETS, AND FAVICONS
========================================================================== */
/* Frontend Enqueuer
-------------------------------------------------------------------------- */
function frontend_enqueuer() {
wp_enqueue_style( 'fonts', 'http://fonts.googleapis.com/css?family=Source+Code+Pro:300,400,700', null, '1.0' );
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', null, '1.0' );
wp_enqueue_style( 'style', get_stylesheet_uri(), null, '1.0', 'all' );
wp_enqueue_script( 'global', get_template_directory_uri() . '/scripts/site/global.js', array('jquery'), '1.0', true );
/**
* Localize site URLs for use in JavaScripts
* Usage: SiteInfo.theme_directory + '/scripts/widget.js'
*/
$site_info = array(
'homeUrl' => get_home_url(),
'theme_directory' => get_template_directory_uri(),
'the_title' => get_the_title()
);
wp_localize_script( 'polyfills', 'SiteInfo', $site_info );
wp_localize_script( 'global', 'SiteInfo', $site_info );
}
add_action( 'wp_enqueue_scripts', 'frontend_enqueuer' );
?>