functions.php 1.7 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
<?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' );
12
		add_image_size( 'medium-thumb', 600, 400, true );
13
14
15
16
17
18
19
20
21
22
23
24

		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
25
26
27
28
29
30
31
32
33
/**
 * 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' );


34
35
36
37
38
39
/**
 * 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
40
	wp_enqueue_script( 'jquery', get_template_directory_uri() . '/assets/js/jquery.min.js', true );
41
	wp_enqueue_script( 'isotope', get_template_directory_uri() . '/assets/js/isotope.min.js');
Benthe Kuijpers's avatar
Benthe Kuijpers committed
42
	wp_enqueue_script( 'makeitopen-script', get_template_directory_uri() . '/assets/js/main.min.js', 'jquery', MIO_VERSION, true );
43
44
45
}
add_action( 'wp_enqueue_scripts', 'makeitopen_scripts' );

46

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

/**
 * MIO Custom Post Types
 */
require get_template_directory() . '/inc/custom-post-types.php';
Benthe Kuijpers's avatar
Benthe Kuijpers committed
56
57

/**
58
 * ACF functions
Benthe Kuijpers's avatar
Benthe Kuijpers committed
59
60
 */
require get_template_directory() . '/inc/acf.php';
61
62
63
64
65

/**
 * Load more function
 */
require get_template_directory() . '/inc/load-more.php';