<?php
/**
 * Register widget area.
 *
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 */
function glamer_widgets_init() {
    register_sidebar(
        array(
            'name'          => esc_html__( 'Sidebar', 'glamer' ),
            'id'            => 'sidebar',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<section id="%1$s" class="widget %2$s">',
            'after_widget'  => '</section>',
            'before_title'  => '<h2 class="widget-title"><span>',
            'after_title'   => '</span></h2>',
        ),
    );
    register_sidebar(
        array(
            'name'          => esc_html__( 'Sidebar Single Post', 'glamer' ),
            'id'            => 'sidebar2',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<section id="%1$s" class="widget %2$s">',
            'after_widget'  => '</section>',
            'before_title'  => '<h2 class="widget-title"><span>',
            'after_title'   => '</span></h2>',
        ),
    );
    if ( class_exists( 'WooCommerce' ) ) {
        register_sidebar(
            array(
                'name'          => esc_html__( 'Shop Page Sidebar', 'glamer' ),
                'id'            => 'glamer-shop',
                'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
                'before_widget' => '<section id="%1$s" class="woo-widgets widget %2$s">',
                'after_widget'  => '</section>',
                'before_title'  => '<h2 class="widget-title">',
                'after_title'   => '</h2>',
            ),
        );
        register_sidebar(
            array(
                'name'          => esc_html__( 'Single Shop Page Sidebar', 'glamer' ),
                'id'            => 'glamer-shop-single',
                'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
                'before_widget' => '<section id="%1$s" class="woo-widgets widget %2$s">',
                'after_widget'  => '</section>',
                'before_title'  => '<h2 class="widget-title">',
                'after_title'   => '</h2>',
            ),
        );
    }
    register_sidebar(
        array(
            'name'          => esc_html__( 'Home One', 'glamer' ),
            'id'            => 'home-1',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<div id="%1$s" class="home-one home-bar-items home-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<h3 class="bar-title">',
            'after_title'   => '</h3>',
        ),
    );

    register_sidebar(
        array(
            'name'          => esc_html__( 'Home Two', 'glamer' ),
            'id'            => 'home-2',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<div id="%1$s" class="home-two home-bar-items home-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<h3 class="bar-title">',
            'after_title'   => '</h3>',
        ),
    );

    register_sidebar(
        array(
            'name'          => esc_html__( 'Home Three', 'glamer' ),
            'id'            => 'home-3',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<div id="%1$s" class="home-bar-items home-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<h3 class="bar-title">',
            'after_title'   => '</h3>',
        ),
    );

    register_sidebar(
        array(
            'name'          => esc_html__( 'Home Four', 'glamer' ),
            'id'            => 'home-4',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<div id="%1$s" class="home-bar-items shadow-bottom home-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<h3 class="bar-title">',
            'after_title'   => '</h3>',
        ),
    );
    register_sidebar(
        array(
            'name'          => esc_html__( 'Home Five', 'glamer' ),
            'id'            => 'home-5',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<div id="%1$s" class="home-bar-items shadow-bottom home-widget %2$s">',
            'after_widget'  => '</div>',
            'before_title'  => '<h3 class="bar-title">',
            'after_title'   => '</h3>',
        ),
    );
    register_sidebar(
        array(
            'name'          => esc_html__( 'Footer One', 'glamer' ),
            'id'            => 'footer-1',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<section id="%1$s" class="widget footer-widget %2$s">',
            'after_widget'  => '</section>',
            'before_title'  => '<h3 class="widget-title">',
            'after_title'   => '</h3>',
        ),
    );

    register_sidebar(
        array(
            'name'          => esc_html__( 'Footer Two', 'glamer' ),
            'id'            => 'footer-2',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<section id="%1$s" class="widget footer-widget %2$s">',
            'after_widget'  => '</section>',
            'before_title'  => '<h3 class="widget-title">',
            'after_title'   => '</h3>',
        ),
    );

    register_sidebar(
        array(
            'name'          => esc_html__( 'Footer Three', 'glamer' ),
            'id'            => 'footer-3',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<section id="%1$s" class="widget footer-widget %2$s">',
            'after_widget'  => '</section>',
            'before_title'  => '<h3 class="widget-title">',
            'after_title'   => '</h3>',
        ),
    );

    register_sidebar(
        array(
            'name'          => esc_html__( 'Footer Four', 'glamer' ),
            'id'            => 'footer-4',
            'description'   => esc_html__( 'Add widgets here.', 'glamer' ),
            'before_widget' => '<section id="%1$s" class="widget footer-widget %2$s">',
            'after_widget'  => '</section>',
            'before_title'  => '<h3 class="widget-title">',
            'after_title'   => '</h3>',
        )
    );

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