<?php
/**
 * WidgetAreas.
 *
 * @package MadeByAura\Prime\Hooks
 * @author  MadeByAura.com
 */

namespace MadeByAura\Prime\Hooks;

use MadeByAura\Prime\Helpers\SingletonTrait;

defined( 'ABSPATH' ) || die();

/**
 * WidgetAreas.
 */
class WidgetAreas {
	use SingletonTrait;

	/**
	 * Constructor.
	 */
	protected function __construct() {
		// Register widget areas.
		add_action( 'widgets_init', [ __CLASS__, 'register' ] );
	}

	/**
	 * Register widget areas.
	 */
	public static function register() {
		register_sidebar(
			[
				'name'          => __( 'Default Sidebar', 'aura-prime' ),
				'id'            => 'aura_sidebar',
				'description'   => '',
				'before_widget' => '<div id="%1$s" class="widget %2$s">',
				'after_widget'  => '</div>',
				'before_title'  => '<h3 class="widgettitle">',
				'after_title'   => '</h3>',
			],
		);
	}
}
