<?php
/**
 * Feminine Lifestyle Blog Widget Areas
 * 
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 * @package Feminine_Lifestyle_Blog
 */
if ( ! function_exists('feminine_lifestyle_blog_widgets_init') ) :

function feminine_lifestyle_blog_widgets_init(){    
    $sidebars = array(
        'sidebar'   => array(
            'name'        => __( 'Sidebar', 'feminine-lifestyle-blog' ),
            'id'          => 'sidebar', 
            'description' => __( 'Default Sidebar', 'feminine-lifestyle-blog' ),
        ),
        'footer-one'=> array(
            'name'        => __( 'Footer One', 'feminine-lifestyle-blog' ),
            'id'          => 'footer-one', 
            'description' => __( 'Add footer one widgets here.', 'feminine-lifestyle-blog' ),
        ),
        'footer-two'=> array(
            'name'        => __( 'Footer Two', 'feminine-lifestyle-blog' ),
            'id'          => 'footer-two', 
            'description' => __( 'Add footer two widgets here.', 'feminine-lifestyle-blog' ),
        ),
        'footer-three'=> array(
            'name'        => __( 'Footer Three', 'feminine-lifestyle-blog' ),
            'id'          => 'footer-three', 
            'description' => __( 'Add footer three widgets here.', 'feminine-lifestyle-blog' ),
        ),
        'footer-four'=> array(
            'name'        => __( 'Footer Four', 'feminine-lifestyle-blog' ),
            'id'          => 'footer-four', 
            'description' => __( 'Add footer four widgets here.', 'feminine-lifestyle-blog' ),
        )
    );
    
    foreach( $sidebars as $sidebar ){
        register_sidebar( array(
    		'name'          => esc_html( $sidebar['name'] ),
    		'id'            => esc_attr( $sidebar['id'] ),
    		'description'   => esc_html( $sidebar['description'] ),
    		'before_widget' => '<section id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</section>',
    		'before_title'  => '<h2 class="widget-title" itemprop="name">',
    		'after_title'   => '</h2>',
    	) );
    }
    
}

endif;
add_action( 'widgets_init', 'feminine_lifestyle_blog_widgets_init' );