<?php
/*
 * Disallow direct access
 */
if( !defined( 'ABSPATH' ) ) {
    die( 'Forbidden.' );
}


/**
 * Edify functions and definitions
 */

 define( 'EDIFY_THEME', true );

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

// shorthand contants for theme assets url
// ------------------------------------------------------------------------
define('EDIFY_THEME_URI', get_template_directory_uri());
define('EDIFY_THEME_ASSETS', get_template_directory_uri().'/assets');

define('EDIFY_IMG', EDIFY_THEME_ASSETS . '/images');
define('EDIFY_CSS', EDIFY_THEME_ASSETS . '/css');

define('EDIFY_PLUGINS', EDIFY_THEME_ASSETS . '/vendors');
define('EDIFY_JS',EDIFY_THEME_ASSETS . '/js');

define('EDIFY_THEME_DIR', get_template_directory());

define('EDIFY_INC',EDIFY_THEME_DIR . '/inc');
define('EDIFY_CORE',EDIFY_THEME_DIR . '/core');


/**
 * Core Setup
 */

 require EDIFY_CORE . '/setup.php';


/**
 * Sidebars Setup
 */
 


/**
 * Register widget area.
 *
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 */
function edify_widgets_init() {
	register_sidebar(
		array(
			'name'          => esc_html__( 'Blog Sidebar', 'edify' ),
			'id'            => 'blog-sidebar',
			'description'   => esc_html__( 'Add widgets here.', 'edify' ),
			'before_widget' => '<section id="%1$s" class="widget %2$s">',
			'after_widget'  => '</section>',
			'before_title'  => '<h4 class="widget-title">',
			'after_title'   => '</h4>',
		)
	);	

	register_sidebar(
		array(
			'name'          => esc_html__( 'Shop Sidebar', 'edify' ),
			'id'            => 'shop-sidebar',
			'description'   => esc_html__( 'Add widgets here.', 'edify' ),
			'before_widget' => '<section id="%1$s" class="widget %2$s">',
			'after_widget'  => '</section>',
			'before_title'  => '<h4 class="widget-title">',
			'after_title'   => '</h4>',
		)
	);	

}
add_action( 'widgets_init', 'edify_widgets_init' );

//  require EDIFY_CORE . '/sidebars.php';

 /**
 * Main Scripts
 */

require EDIFY_CORE . '/scripts.php';

/**
 * default Customizer additions.
 */
require EDIFY_INC . '/customizer.php';
require_once EDIFY_INC . '/edify-breadcrumb.php';
/**
 * Implement the Custom Header feature.
 */
require EDIFY_INC . '/custom-header.php';

/**
 * Custom template tags for this theme.
 */
require EDIFY_INC . '/template-tags.php';

/**
 * Plugin Activation
 */
require EDIFY_INC . '/tgm-plugin/plugin-active.php';

/**
 * Functions which enhance the theme by hooking into WordPress.
 */
require EDIFY_INC . '/template-functions.php';
require EDIFY_INC . '/edify-functions.php';
require EDIFY_INC . '/theme-style.php';

/**
 * WooCommerce Function
 */
if ( class_exists( 'WooCommerce' ) ) {
    require_once EDIFY_INC . '/woocommerce/edify-woocommerce.php';
}
/**
 * Customizer Function
 */

if(class_exists('kirki') ){
	require EDIFY_CORE . '/customizer/options.php';
}


/**
 * Header Footer
 */
require EDIFY_INC . '/header-footer.php';



