<?php
/*
Widget Name:  Aboutus Widget
Description: Create About Us Section
Author: Shiju
*/

if( class_exists( 'SiteOrigin_Widget' ) ) : 

class aboutus_widget extends SiteOrigin_Widget {

    function __construct() {
        //Here you can do any preparation required before calling the parent constructor, such as including additional files or initializing variables.

        //Call the parent constructor with the required arguments.
        parent::__construct(
            // The unique id for your widget.
            'aboutus_widget',

            // The name of the widget for display purposes.
            esc_html__('Swap About us', 'swap'),

            // The $widget_options array, which is passed through to WP_Widget.
            // It has a couple of extras like the optional help URL, which should link to your sites help or support page.
            array(
                'description' => esc_html__('Create About Us Section', 'swap'),
                'panels_groups' => array('swap'),
                'help'        => '#',
            ),

            //The $control_options array, which is passed through to WP_Widget
            array(
            ),

            //The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.
            array(
                 'backgroundcolor' => array(
                    'type' => 'color',
                    'label' => esc_html__('About Background color ', 'swap'),
                    'default' => '#ffffff'
                ),
               
                
                
				
				 'tagline' => array(
                    'type' => 'text',
                    'label' => esc_html__('Enter tagline for right side section', 'swap'),
                    'default' => ''
                ),
				'title' => array(
                    'type' => 'text',
                    'label' => esc_html__('Enter title', 'swap'),
                    'default' => ''
                ),
                   
                   'image1' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image1', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'image2' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
              'image3' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'image4' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'title1' => array(
                    'type' => 'text',
                    'label' => esc_html__('Enter title1', 'swap'),
                    'default' => ''
                ),	
				 
                'content' => array(
                    'type' => 'tinymce',
                    'label' => esc_html__('Text', 'swap'),
                    'default' => ''
                ),
				
				
            
                'title2' => array(
                    'type' => 'text',
                    'label' => esc_html__('Enter title', 'swap'),
                    'default' => ''
                ),
             'content1' => array(
                    'type' => 'tinymce',
                    'label' => esc_html__('Text', 'swap'),
                    'default' => ''
                ),
				 
                   'image5' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image1', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'image6' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
              'image7' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'image8' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				
						'title3' => array(
                    'type' => 'text',
                    'label' => esc_html__('Enter title', 'swap'),
                    'default' => ''
                ),
             'content2' => array(
                    'type' => 'tinymce',
                    'label' => esc_html__('Text', 'swap'),
                    'default' => ''
                ),
				 
                   'image9' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image1', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'image10' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
              'image11' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'image12' => array(
                    'type' => 'media',
                    'label' => esc_html__( 'Choose about image2', 'swap' ),
                    'choose' => esc_html__( 'Choose image', 'swap' ),
                    'update' => esc_html__( 'Set image', 'swap' ),
                    'library' => 'image',
                    'fallback' => true
                ),
				'button_text' => array(
                   'type' => 'text',
                   'label' => esc_html__('Button Text', 'swap'),
                   'description' => esc_html__('Button CTA text', 'swap'),
                   'default' => ''
                ),
                'button_url' => array(
                   'type' => 'link',
                   'label' => esc_html__('Button Link', 'swap'),
                   'description' => esc_html__('Button url', 'swap'),
                   'default' => '#'
                ),
				'button_text1' => array(
                   'type' => 'text',
                   'label' => esc_html__('Button Text', 'swap'),
                   'description' => esc_html__('Button CTA text', 'swap'),
                   'default' => ''
                ),
                'button_url1' => array(
                   'type' => 'link',
                   'label' => esc_html__('Button Link', 'swap'),
                   'description' => esc_html__('Button url', 'swap'),
                   'default' => '#'
                ),
				'button_text2' => array(
                   'type' => 'text',
                   'label' => esc_html__('Button Text', 'swap'),
                   'description' => esc_html__('Button CTA text', 'swap'),
                   'default' => ''
                ),
                'button_url2' => array(
                   'type' => 'link',
                   'label' => esc_html__('Button Link', 'swap'),
                   'description' => esc_html__('Button url', 'swap'),
                   'default' => '#'
                ),
            ),

            //The $base_folder path string.
            plugin_dir_path(__FILE__)
        );
    }

    function get_template_name($instance) {
        return 'aboutus';
    }

    function get_template_dir($instance) {
        return 'widgets';
    }
}

siteorigin_widget_register('aboutus_widget', __FILE__, 'aboutus_widget');

endif;

