# firebox/1.0.4/Inc/Core/Widgets.php

FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin &amp; Cart Abandonment, version 1.0.4. 49 lines.

- Page: https://pluginprobe.com/plugins/firebox/1.0.4/code/Inc/Core/Widgets.php
- Raw: https://pluginprobe.com/plugins/firebox/1.0.4/raw/Inc/Core/Widgets.php
- Modified: 2021-07-19T14:57:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/firebox/1.0.4/code/Inc/Core/Widgets.php#L10-L20`.

```php
<?php
/**
 * @package         FireBox
 * @version         1.0.4 Free
 * 
 * @author          FirePlugins <info@fireplugins.com>
 * @link            https://www.fireplugins.com
 * @copyright       Copyright © 2021 FirePlugins All Rights Reserved
 * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/

namespace FireBox\Core;

if (!defined('ABSPATH'))
{
	exit; // Exit if accessed directly.
}

class Widgets
{
	/**
	 * All Plugin Widgets
	 * 
	 * @return  array
	 */
	const widgets = [
		'FireBoxButton'
	];
	
    public function __construct()
    {
		// register widgets
		add_action('widgets_init', [$this, 'registerAllWidgets']);
	}
	
	/**
	 * Registers all widgets
	 * 
	 * @return  void
	 */
	public function registerAllWidgets()
	{
		foreach (self::widgets as $widget)
		{
			$name = '\FireBox\Core\Widgets\\' . $widget;
			register_widget($name);
		}
	}
}
```
