<?php
/**
 * Studiare functions and definitions
 */

# Constants
define('STUDIARE_THEMEDIR', 		get_theme_file_path() . '/');
define('STUDIARE_THEMEURL', 		get_theme_file_uri() . '/');
define('STUDIARE_THEMEASSETS',	    STUDIARE_THEMEURL . 'assets/');
define('STUDIARE_TD', 			    'studiare');
define('STUDIARE_TS', 			    microtime(true));

# Initial Actions
add_action( 'after_setup_theme',    'studiare_after_setup_theme' );
add_action('init', 				    'studiare_init');

add_action('wp_enqueue_scripts',    'studiare_wp_enqueue_scripts');

if (!isset($content_width)) {
	$content_width = 1120;
}

# Core Files
require get_parent_theme_file_path( '/inc/codebean_functions.php' );
require get_parent_theme_file_path( '/inc/codebean_actions.php' );
require get_parent_theme_file_path( '/inc/codebean_filters.php' );
require get_parent_theme_file_path( '/inc/codebean_vc.php' );
require get_parent_theme_file_path( '/inc/codebean_woocommerce.php' );

# Widgets
require get_parent_theme_file_path( '/inc/widgets/contacts.php' );

if ( !isset( $redux_demo ) && file_exists( dirname( __FILE__ ) . '/inc/codebean_options.php' ) ) {
	require_once( dirname( __FILE__ ) . '/inc/codebean_options.php' );
}

# Libraries
require get_parent_theme_file_path('/inc/tgm/tgm-plugin-registration.php');