<?php

define( 'ROONIX_ROOT', get_template_directory() . '/' );

require_once get_template_directory() . '/includes/functions/functions.php';
include_once get_template_directory() . '/includes/classes/base.php';
include_once get_template_directory() . '/includes/classes/dotnotation.php';
include_once get_template_directory() . '/includes/classes/header-enqueue.php';
include_once get_template_directory() . '/includes/classes/options.php';
include_once get_template_directory() . '/includes/classes/ajax.php';
include_once get_template_directory() . '/includes/classes/common.php';
include_once get_template_directory() . '/includes/classes/bootstrap_walker.php';
include_once get_template_directory() . '/includes/classes/custom-style.php';
include_once get_template_directory() . '/includes/library/class-tgm-plugin-activation.php';
require_once get_template_directory() . '/includes/library/hook.php';

// Merlin demo import.
require_once get_template_directory() . '/demo-import/ocdi/functions.php';

add_action( 'after_setup_theme', 'roonix_wp_load', 5 );

function roonix_wp_load() {

	defined( 'ROONIX_URL' ) or define( 'ROONIX_URL', get_template_directory_uri() . '/' );
	define(  'ROONIX_KEY','!@#roonix');
	define(  'ROONIX_URI', get_template_directory_uri() . '/');

	if ( ! defined( 'ROONIX_NONCE' ) ) {
		define( 'ROONIX_NONCE', 'roonix_wp_theme' );
	}

	( new \ROONIX\Includes\Classes\Base )->loadDefaults();
	( new \ROONIX\Includes\Classes\Ajax )->actions();

}
add_action( 'init', 'roonix_bunch_theme_init');
function roonix_bunch_theme_init()
{
	$bunch_exlude_hooks = include_once get_template_directory(). '/includes/resource/remove_action.php';
	foreach( $bunch_exlude_hooks as $k => $v )
	{
		foreach( $v as $value )
		remove_action( $k, $value[0], $value[1] );
	}

}
