# firebox/2.1.39/Inc/Core/Blocks/HCaptcha.php

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

- Page: https://pluginprobe.com/plugins/firebox/2.1.39/code/Inc/Core/Blocks/HCaptcha.php
- Raw: https://pluginprobe.com/plugins/firebox/2.1.39/raw/Inc/Core/Blocks/HCaptcha.php
- Modified: 2025-07-10T08:25:24+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/2.1.39/code/Inc/Core/Blocks/HCaptcha.php#L10-L20`.

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

namespace FireBox\Core\Blocks;

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

class HCaptcha extends \FireBox\Core\Blocks\Block
{
	/**
	 * Block identifier.
	 * 
	 * @var  string
	 */
	protected $name = 'hcaptcha';

	public function render_callback($attributes, $content)
	{
		$blockPayload = [
			'blockName' => $this->name,
			'attrs' => $attributes
		];

		$payload = [
			'id' => $attributes['uniqueId'],
			'label' => isset($attributes['fieldLabel']) ? $attributes['fieldLabel'] : \FireBox\Core\Helpers\Form\Field::getFieldLabel($blockPayload),
			'hideLabel' => isset($attributes['hideLabel']) ? $attributes['hideLabel'] : false,
			'description' => isset($attributes['helpText']) ? $attributes['helpText'] : '',
			'field_type' => isset($attributes['field_type']) ? $attributes['field_type'] : 'checkbox',
			'theme' => isset($attributes['theme']) ? $attributes['theme'] : 'light',
			'size' => isset($attributes['size']) ? $attributes['size'] : 'normal',
			'width' => isset($attributes['width']) ? $attributes['width'] : '',
			'css_class' => isset($attributes['cssClass']) && !empty($attributes['cssClass']) ? [$attributes['cssClass']] : [],
		];

		// Replace Smart Tags
		$payload = \FPFramework\Base\SmartTags\SmartTags::getInstance()->replace($payload);
		
		$field = new \FireBox\Core\Form\Fields\Fields\HCaptcha($payload);

		// $content contains CSS variables for the field
		return $content . $field->render();
	}
}
```
