functions.php 1.39 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
if ( ! defined( 'MIO_VERSION' ) ) {
	// Replace the version number of the theme on each release.
	define( 'MIO_VERSION', '0.0.1' );
}

if ( ! function_exists( 'makeitopen_setup' ) ) :
	function makeitopen_setup() {
		
		add_theme_support( 'title-tag' );
		add_theme_support( 'post-thumbnails' );

		add_theme_support('html5', array('search-form', 'gallery', 'caption', 'style' ) );
		
		register_nav_menus(
			array(
				'menu' => esc_html__( 'Menu', 'makeitopen' ),
			)
		);
	}
endif;
add_action( 'after_setup_theme', 'makeitopen_setup' );

Benthe Kuijpers's avatar
Benthe Kuijpers committed
24
25
26
27
28
29
30
31
32
/**
 * Disable emoji's so the arrow characters are shown
 */
function disable_emojis() {
 remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
}
add_action( 'init', 'disable_emojis' );


33
34
35
36
37
38
/**
 * Enqueue scripts and styles.
 */
function makeitopen_scripts() {
	wp_enqueue_style( 'makeitopen-style', get_template_directory_uri() . '/assets/css/style.css', array(), MIO_VERSION);

Benthe Kuijpers's avatar
Benthe Kuijpers committed
39
40
	wp_enqueue_script( 'jquery', get_template_directory_uri() . '/assets/js/jquery.min.js', true );
	wp_enqueue_script( 'makeitopen-script', get_template_directory_uri() . '/assets/js/main.min.js', 'jquery', MIO_VERSION, true );
41
42
43
44
45

}
add_action( 'wp_enqueue_scripts', 'makeitopen_scripts' );

/**
46
 * MIO custom global functions
47
48
 */
require get_template_directory() . '/inc/template-functions.php';
49
50
51
52
53

/**
 * MIO Custom Post Types
 */
require get_template_directory() . '/inc/custom-post-types.php';