<?php

/**
 * This class includes and manage all widgets functionality.
 *
 * @since 1.0
 * @package SiteEase_Smart_Product_Filtering_Engine
 * @subpackage SiteEase_Smart_Product_Filtering_Engine/public 
 */
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class IFQPF_SiteEase_Smart_Product_Filtering_Engine_Widgets {

	/**
	 * Initialize the class and set its properties.
	 *
	 * @since 1.1
	 */
	public function __construct(){

		$this->ifqpf_include_widgets();

	}

	/**
	 * Require all widgets class files
	 *
	 * @since 1.1
	 */
	public function ifqpf_include_widgets(){
		
		require_once( IFQPF_PUBLIC_DIR_PATH.'widgets/ifqpf-class-form-widget.php' );

	}

	/**
	 * Register all widgets
	 *
	 * @since 1.1
	 */
	public function ifqpf_register_widgets(){

		// Register the correct widget class defined in
		// public/widgets/class-ifqpf-form-widget.php.
		register_widget( 'IFQPF_SiteEase_Smart_Product_Filtering_Engine_Form_widget' );

	}

	/**
	 * Define all hooks
	 *
	 * @since 1.1
	 */
	public function ifqpf_add_hooks(){

		add_action( 'widgets_init', array($this, 'ifqpf_register_widgets') );

	}

}