<?php
/** 
 * Functions file.
 * 
 * To getting start design the theme, please begins by reading on this link. https://codex.wordpress.org/Theme_Development
 * You can make this theme as your parent theme (design new by modify this theme and make it yours).
 * But I recommend that you use this theme as parent and create your new child theme.
 * 
 * Learn more about template hierarchy, please read on this link. https://developer.wordpress.org/themes/basics/template-hierarchy/
 * 
 * @package bootstrap-basic4
 */


// Required WordPress variable
if (!isset($content_width)) {
    $content_width = 1140;// this will be override again in inc/classes/BootstrapBasic4.php `detectContentWidth()` method.
}


// Configurations ----------------------------------------------------------------------------
// Left sidebar column size. Bootstrap have 12 columns this sidebar column size must not greater than 12.
if (!isset($bootstrapbasic4_sidebar_left_size)) {
    $bootstrapbasic4_sidebar_left_size = apply_filters('bootstrap_basic4_column_left', 3);
}
// Right sidebar column size.
if (!isset($bootstrapbasic4_sidebar_right_size)) {
    $bootstrapbasic4_sidebar_right_size = apply_filters('bootstrap_basic4_column_right', 3);
}
// Once you specified left and right column size, while widget was activated in all or some sidebar the main column size will be calculate automatically from these size and widgets activated.
// For example: you use only left sidebar (widgets activated) and left sidebar size is 4, the main column size will be 12 - 4 = 8.
// 
// Title separator. Please note that this value maybe able overriden by other plugins.
if (!isset($bootstrapbasic4_title_separator)) {
    $bootstrapbasic4_title_separator = '|';
}


// Require, include files ---------------------------------------------------------------------
require get_template_directory() . '/inc/classes/Autoload.php';
require get_template_directory() . '/inc/functions/include-functions.php';

// Setup auto load for load the class files without manually include file by file.
$bootstrap_basic4_Autoload = new \BootstrapBasic4\Autoload();
$bootstrap_basic4_Autoload->register();
$bootstrap_basic4_Autoload->addNamespace('BootstrapBasic4', get_template_directory() . '/inc/classes');
unset($bootstrap_basic4_Autoload);

// Call to actions/filters of the theme to enable features, register sidebars, enqueue scripts and styles.
$BootstrapBasic4 = new \BootstrapBasic4\BootstrapBasic4();
$BootstrapBasic4->addActionsFilters();
unset($BootstrapBasic4);

// Call to actions/filters of theme hook to hook into WordPress and make changes to the theme.
$bootstrap_basic4_Bsb4Hooks = new \BootstrapBasic4\Hooks\Bsb4Hooks();
$bootstrap_basic4_Bsb4Hooks->addActionsFilters();
unset($bootstrap_basic4_Bsb4Hooks);

// Call to auto register widgets.
$bootstrap_basic4_AutoRegisterWidgets = new BootstrapBasic4\Widgets\AutoRegisterWidgets();
$bootstrap_basic4_AutoRegisterWidgets->registerAll();
unset($bootstrap_basic4_AutoRegisterWidgets);

// Call to actions/filters of theme hook to hook into WordPress widgets.
$bootstrap_basic4_WidgetHooks = new \BootstrapBasic4\Hooks\WidgetHooks();
$bootstrap_basic4_WidgetHooks->addActionsFilters();
unset($bootstrap_basic4_WidgetHooks);

// Display theme help page for admin.
$bootstrap_basic4_ThemeHelp = new \BootstrapBasic4\Controller\ThemeHelp();
$bootstrap_basic4_ThemeHelp->addActionsFilters();
unset($bootstrap_basic4_ThemeHelp);
