<?php
global $theme_info;
$theme_info = wp_get_theme();
define('STM_THEME_VERSION', ( WP_DEBUG ) ? time() : $theme_info->get( 'Version' ) );

$inc_path = get_template_directory() . '/inc';

$widgets_path = get_template_directory() . '/inc/widgets';
define('masterstudy', 'masterstudy');

// Theme setups

// Custom code and theme main setups
require_once($inc_path . '/setup.php');

// Enqueue scripts and styles for theme
require_once($inc_path . '/scripts_styles.php');

/*Theme configs*/
require_once($inc_path . '/theme-config.php');

// Customizer opt
//require_once($inc_path . '/redux-framework/admin-init.php');
//require_once( $inc_path . '/customizer/setup.php' );

// Required plugins for theme
require_once($inc_path . '/tgm/tgm-plugin-registration.php');

// Visual composer custom modules
if (defined('WPB_VC_VERSION')) {
	require_once($inc_path . '/visual_composer.php');
}

// Custom code for any outputs modifying
//require_once($inc_path . '/payment.php');
require_once($inc_path . '/custom.php');

// Custom code for woocommerce modifying
if (class_exists('WooCommerce')) {
	add_theme_support('woocommerce');
	require_once($inc_path . '/woocommerce_setups.php');

	// Custom Woo widget
	require_once($widgets_path . '/woo_popular_courses.php');
}

// Mailchimp widget
require_once($widgets_path . '/mailchimp.php');
require_once($widgets_path . '/contacts.php');
require_once($widgets_path . '/pages.php');
require_once($widgets_path . '/socials.php');
require_once($widgets_path . '/recent_posts.php');
require_once($widgets_path . '/working_hours.php');
require_once($widgets_path . '/text.php');

if(defined('STM_LMS_URL')) {
	require_once($inc_path . '/lms/main.php');
}

//Announcement banner
if (is_admin()) {
	require_once($inc_path . '/announcement/main.php');
	require_once($inc_path . '/admin/generate_styles.php');
	require_once($inc_path . '/admin/admin_helpers.php');
	require_once($inc_path . '/admin/review/review-notice.php');
	require_once(get_template_directory() . '/inc/admin/product_registration/admin.php');
}