<?php
/**
 * The sidebar containing the main widget area.
 *
 * @package Eronex
 * @since 0.0.1
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Filters the main sidebar ID used for the widget area.
 *
 * @since 0.0.1
 *
 * @param string $sidebar Sidebar ID. Default 'sidebar-1'.
 */
$main_sidebar  = apply_filters( 'eronex_get_sidebar', 'sidebar-1' );
$sidebar_style = eronex_option( 'eronex_sidebar_style', 'boxed' );
?>
<div class="eronex-widgets eronex-widgets-style-<?php echo esc_attr( $sidebar_style ); ?>">
	<?php
	if ( is_active_sidebar( $main_sidebar ) ) {
		dynamic_sidebar( $main_sidebar );
	}
	?>
</div>
