functions.php 1.04 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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' );

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

	wp_enqueue_script( 'makeitopen-script', get_template_directory_uri() . '/assets/js/main.js', array(), MIO_VERSION, true );

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

/**
 * Functions which enhance the theme by hooking into WordPress.
 */
require get_template_directory() . '/inc/template-functions.php';