# firebox/1.0.4/Inc/Core/Admin/Includes/Metaboxes.php

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

- Page: https://pluginprobe.com/plugins/firebox/1.0.4/code/Inc/Core/Admin/Includes/Metaboxes.php
- Raw: https://pluginprobe.com/plugins/firebox/1.0.4/raw/Inc/Core/Admin/Includes/Metaboxes.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/Admin/Includes/Metaboxes.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\Admin\Includes;

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

class Metaboxes
{
	/**
	 * The path where plugin metaboxes can be found
	 * 
	 * @var  string
	 */
	private $path = '\FireBox\Core\Admin\Includes\Metaboxes\\';

	public function __construct()
	{
		// get all plugin metaboxes
		add_filter('fpframework/metaboxes_filter', [$this, 'filterPluginMetaboxes']);
	}
	
	/**
	 * Adds plugin metaboxes to framework list of metaboxes
	 * 
	 * @param   array   $metaboxes
	 * 
	 * @return  array
	 */
	public function filterPluginMetaboxes($metaboxes)
	{
		$metaboxes[] = $this->getMetaboxes();
		return $metaboxes;
	}

	/**
	 * Returns all plugin metaboxes
	 * 
	 * @return  array
	 */
	private function getMetaboxes()
	{
		return \FPFramework\Helpers\FileHelper::getFileNamesFromFolder($this->path, FBOX_PLUGIN_DIR . 'Inc/Core/Admin/Includes/Metaboxes/');
	}
}
```
