<?php
/**
 * Wellness Coach Lite Widget Areas
 * 
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 * @package Wellness_Coach_Lite
 */

function wellness_coach_lite_widgets_init(){    
    $sidebars = array(
        'sidebar'   => array(
            'name'        => __( 'Sidebar', 'wellness-coach-lite' ),
            'id'          => 'sidebar', 
            'description' => __( 'Default Sidebar', 'wellness-coach-lite' ),
        ),
        'newsletter' => array(
            'name'        => __( 'Newsletter Section', 'wellness-coach-lite' ),
            'id'          => 'newsletter', 
            'description' => __( 'Add "BlossomThemes: Email Newsletter" widget for newsletter section.', 'wellness-coach-lite' ),
        ),
        'client' => array(
            'name'        => __( 'Client Section', 'wellness-coach-lite' ),
            'id'          => 'client', 
            'description' => __( 'Add "Blossom: Client Logo Widget" for client section. The recommended image size for this section is 330px by 190px in PNG format.', 'wellness-coach-lite' ),
        ),
        'feature' => array(
            'name'        => __( 'Feature Section', 'wellness-coach-lite' ),
            'id'          => 'feature', 
            'description' => __( 'Add "Blossom: Image Text" widget for feature section. The recommended image size for this section is 370px by 494px in PNG format.', 'wellness-coach-lite' ),
        ),
        'about' => array(
            'name'        => __( 'About Section', 'wellness-coach-lite' ),
            'id'          => 'about', 
            'description' => __( 'Add "Blossom: Featured Page Widget" for about section.', 'wellness-coach-lite' ),
        ),
        'service' => array(
            'name'        => __( 'Benefits Section', 'wellness-coach-lite' ),
            'id'          => 'service', 
            'description' => __( 'Add "Blossom: Icon text" widget for benefits section.', 'wellness-coach-lite' ),
        ),
        'service-cta' => array(
            'name'        => __( 'Benefits Section CTA', 'wellness-coach-lite' ),
            'id'          => 'service-cta', 
            'description' => __( 'Add "Blossom: Call To Action" widget for benefits section cta.', 'wellness-coach-lite' ),
        ),
        'testimonial' => array(
            'name'        => __( 'Testimonial Section', 'wellness-coach-lite' ),
            'id'          => 'testimonial', 
            'description' => __( 'Add "Blossom: Testimonial" widget for testimonial section.', 'wellness-coach-lite' ),
        ),        
        'service-two' => array(
            'name'        => __( 'Service Two Section', 'wellness-coach-lite' ),
            'id'          => 'service-two', 
            'description' => '',
        ),
        'blog_section' => array(
            'name'        => __( 'Blog Section', 'wellness-coach-lite' ),
            'id'          => 'blog_section', 
            'description' => __( 'Add "BlossomThemes: Email Newsletter Widget" & "Blossom: Call To Action" widget for blog section.', 'wellness-coach-lite' ),
        ),
        'contact' => array(
            'name'        => __( 'Contact Section', 'wellness-coach-lite' ),
            'id'          => 'contact', 
            'description' => __( 'Add "Blossom: Contact Widget" & "Text" widgets for contact section.', 'wellness-coach-lite' ),
        ),
        'footer-one'=> array(
            'name'        => __( 'Footer One', 'wellness-coach-lite' ),
            'id'          => 'footer-one', 
            'description' => __( 'Add footer one widgets here.', 'wellness-coach-lite' ),
        ),
        'footer-two'=> array(
            'name'        => __( 'Footer Two', 'wellness-coach-lite' ),
            'id'          => 'footer-two', 
            'description' => __( 'Add footer two widgets here.', 'wellness-coach-lite' ),
        ),
        'footer-three'=> array(
            'name'        => __( 'Footer Three', 'wellness-coach-lite' ),
            'id'          => 'footer-three', 
            'description' => __( 'Add footer three widgets here.', 'wellness-coach-lite' ),
        ),
        'footer-four'=> array(
            'name'        => __( 'Footer Four', 'wellness-coach-lite' ),
            'id'          => 'footer-four', 
            'description' => __( 'Add footer four widgets here.', 'wellness-coach-lite' ),
        )
    );
    
    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>',
    	) );
    }
    
}
add_action( 'widgets_init', 'wellness_coach_lite_widgets_init' );