<?php
/**
 * Widget areas.
 *
 * @package ttsunsolar
 */

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

/**
 * Register sidebars.
 */
function ttsunsolar_widgets_init() {
	register_sidebar(
		array(
			'name'          => __( 'Sidebar', 'ttsunsolar' ),
			'id'            => 'sidebar-1',
			'description'   => __( 'Main sidebar widgets.', 'ttsunsolar' ),
			'before_widget' => '<section id="%1$s" class="widget %2$s">',
			'after_widget'  => '</section>',
			'before_title'  => '<h2 class="widget-title">',
			'after_title'   => '</h2>',
		)
	);

	for ( $i = 1; $i <= 4; $i++ ) {
		register_sidebar(
			array(
				'name'          => sprintf(
					/* translators: %d: footer column number */
					__( 'Footer Column %d', 'ttsunsolar' ),
					$i
				),
				'id'            => 'footer-' . $i,
				'description'   => __( 'Footer column widgets. Leave empty to use theme defaults.', 'ttsunsolar' ),
				'before_widget' => '<section id="%1$s" class="widget footer-widget %2$s">',
				'after_widget'  => '</section>',
				'before_title'  => '<h2 class="footer-title">',
				'after_title'   => '</h2>',
			)
		);
	}
}
add_action( 'widgets_init', 'ttsunsolar_widgets_init' );
