<?php

if ( ! defined( '_S_VERSION' ) ) {
	// Replace the version number of the theme on each release.
	define( '_S_VERSION', '1.0' );
}

add_image_size('full-hd', 1920, 1080);

function mpwbpk_nav_menus() {
	register_nav_menus([
		'menu-default' => __( 'Main menu' ),
		'menu-footer' => __( 'Footer menu' ),
	]);
}
add_action( 'init', 'mpwbpk_nav_menus' );

/**
 * Default theme supports
 */
function mpwbpk_setup() {
	add_theme_support( 'title-tag' );

	add_theme_support('post-thumbnails');

	add_theme_support( 'html5', array(
		'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
	));

	add_theme_support( 'post-formats', array(
		'aside', 'image', 'video', 'quote', 'link',
	));
}
add_action('after_setup_theme', 'mpwbpk_setup');

function allow_svg_upload( $mimes = array() ) {
    $mimes['svg'] = 'image/svg+xml';
    $mimes['svgz'] = 'image/svg+xml';
    $mimes['json'] = 'application/json';

    return $mimes;
}
add_filter( 'upload_mimes', 'allow_svg_upload' );

function mpwbpk_remove_wp_block_library_css(){
    wp_dequeue_style('wp-block-library');
    wp_deregister_style('wc-blocks-style');
    wp_dequeue_style('wc-blocks-style');
}
add_action( 'wp_enqueue_scripts', 'mpwbpk_remove_wp_block_library_css' );

add_theme_support('editor-styles');
add_editor_style( '/editor-style.css' );

include 'functions/block-patterns.php';
include 'functions/admin-pages.php';

/**
 * inc
 */
require_once get_template_directory().'/inc/__inc__.php';