<?php
/**
 * Masterpiece functions and definitions
 *
 * @package masterpiece
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

define('MASTERPIECE_THEME', 'theme-version-number');

$masterpiece_includes = array(
	'/setup.php',                           // Theme setup and custom theme supports.
	'/widgets.php',                         // Register widget area.
	'/enqueue.php',                         // Enqueue scripts and styles.
	'/template-tags.php',                   // Custom template tags for this theme.
	'/pagination.php',                      // Custom pagination for this theme.
	'/hooks.php',                           // Custom hooks.
	'/extras.php',                          // Custom functions that act independently of the theme templates.
	'/customizer.php',                      // Customizer additions.
	'/custom-comments.php',                 // Custom Comments file.
	'/jetpack.php',                         // Load Jetpack compatibility file.
	'/class-wp-bootstrap-navwalker.php',    // Load custom WordPress nav walker.
	'/woocommerce.php',                     // Load WooCommerce functions.
	'/dynamic-style.php',
);

foreach ( $masterpiece_includes as $file ) {
	$filepath = locate_template( 'inc' . $file );
	if ( ! $filepath ) {
		/* translators: 1: Name and path of the file not loading. */
		trigger_error( sprintf( esc_html__('Error locating /inc%s for inclusion', 'masterpiece'), $file ), E_USER_ERROR ); 
	}
	require_once $filepath;
}

require_once( trailingslashit( get_template_directory() ) . 'trt-customizer-pro/class-customize.php' );
require_once( trailingslashit( get_template_directory() ) . 'vendor/customizer-custom-controls/customizer-custom-controls.php' );
require_once( trailingslashit( get_template_directory() ) . 'vendor/tgm/auxilary-plugins.php' );