<?php
/**
 * About Footer widget.
 *
 * @package    ShoBe
 * @author     Boby Hermez
 * @copyright  Copyright (c) 2025, Boby Hermez
 * @license    http://www.gnu.org/licenses/gpl-2.0.html
 * @since      1.0.0
 */
class Shobe_about_footer_Widget extends WP_Widget {

	/**
	 * Sets up the widgets.
	 *
	 * @since 1.0.0
	 */
	function __construct() {

		// Set up the widget options.
		$shobe_widget_options = array(
			'classname'   => 'widget-shobe-about widget_about',
			'description' => __( 'Easily to display About on Footer Section.', 'shobe' )
		);

		// Create the widget.
		parent::__construct(
			'shobe-about-footer',                            // $this->id_base
			__( '&raquo; ShoBe About Footer Widget', 'shobe' ), // $this->name
			$shobe_widget_options                            // $this->shobe_widget_options
		);
	}

	/**
	 * Outputs the widget based on the arguments input through the widget controls.
	 *
	 * @since 1.0.0
	 */
	function widget( $args, $instance ) {
		extract( $args );

		// Output the theme's $before_widget wrapper.
		echo $before_widget;
	
        echo shobe_get_contact_address();
		
		// Close the theme's widget wrapper.
		echo $after_widget;

	}

	/**
	 * Updates the widget control options for the particular instance of the widget.
	 *
	 * @since 1.0.0
	 */
	function update( $new_instance, $old_instance ) {

		$instance = $new_instance;

		$instance['title'] = ( ! empty( $instance['title'] ) ) ? sanitize_text_field( strip_tags( $instance['title'] ) ) : '';

		return $instance;

		
	}

	/**
	 * Displays the widget control options in the Widgets admin screen.
	 *
	 * @since 1.0.0
	 */
	function form( $instance ) {

		// Default value.
		$defaults = array();

		$instance = wp_parse_args( (array) $instance, $defaults );
	?>



	<?php

	}

}


function register_shobe_about_footer_Widget() {
	register_widget( 'Shobe_about_footer_Widget' );
}
add_action( 'widgets_init', 'register_shobe_about_footer_Widget' );