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

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

- Page: https://pluginprobe.com/plugins/firebox/1.0.4/code/Inc/Core/Blocks.php
- Raw: https://pluginprobe.com/plugins/firebox/1.0.4/raw/Inc/Core/Blocks.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/Blocks.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 Blocks
{
    public function __construct()
    {
        $this->init();
    }

    /**
     * Initialize all blocks
     * 
     * @return  void
     */
    public function init()
    {
        $blocks = \scandir(dirname(__FILE__) . '/Blocks');

        foreach ($blocks as $block_file_name)
        {
            if (!$ext = pathinfo($block_file_name, PATHINFO_EXTENSION))
            {
                continue;
            }

            $class = '\FireBox\Core\Blocks\\' . basename($block_file_name, '.php');

            if (!class_exists($class))
            {
                continue;
            }
            
            new $class();
        }
        
    }
            
}
```
