-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
50 lines (46 loc) · 1.63 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
<?php
if ( ! function_exists( 'super_uikit_theme_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support for post thumbnails.
*/
function super_uikit_theme_setup() {
/**
* Add default posts and comments RSS feed links to <head>.
*/
add_theme_support( 'automatic-feed-links' );
/**
* Enable support for post thumbnails and featured images.
*/
add_theme_support( 'post-thumbnails' );
add_theme_support( 'editor-styles' );
add_theme_support( 'wp-block-styles' );
}
endif;
add_action( 'after_setup_theme', 'super_uikit_theme_setup' );
/**
* Enqueue theme scripts and styles.
*/
function super_uikit_theme_scripts() {
wp_enqueue_style( 'super-uikit-style', get_stylesheet_uri() );
wp_enqueue_style( 'super-uikit-style', get_template_directory_uri() . '/assets/css/uikit-min.css', array(), wp_get_theme()->get( 'Version' ) );
// Include Uikit js.
wp_enqueue_script(
'super-uikit-uikit-js',
get_template_directory_uri() . '/assets/js/uikit.min.js',
array(),
wp_get_theme()->get( 'Version' ),
false
);
wp_enqueue_script(
'super-uikit-uikit-icons-js',
get_template_directory_uri() . '/assets/js/uikit-icons.min.js',
array(),
wp_get_theme()->get( 'Version' ),
false
);
}
add_action( 'wp_enqueue_scripts', 'super_uikit_theme_scripts' );