HEX
Server: LiteSpeed
System: Linux server214.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: bigisxfd (746)
PHP: 8.4.15
Disabled: NONE
Upload Files
File: /home/bigisxfd/public_html/wp-content/plugins/otter-blocks/inc/render/class-form-nonce-block.php
<?php
/**
 * Form_Nonce_Block
 *
 * @package ThemeIsle\GutenbergBlocks\Render
 */

namespace ThemeIsle\GutenbergBlocks\Render;

/**
 * Class Form_Nonce_Block
 */
class Form_Nonce_Block {

	/**
	 * Block render function for server-side.
	 *
	 * This method will pe passed to the render_callback parameter and it will output
	 * the server side output of the block.
	 *
	 * @param array $attributes Block attrs.
	 * @return mixed|string
	 */
	public function render( $attributes ) {
		$output = '<div class="protection" aria-hidden="true">';
		if ( isset( $attributes['formId'] ) ) {
			$output .= wp_nonce_field( 'form-verification', $attributes['formId'] . '_nonce_field', true, false );
		} else {
			$output .= wp_nonce_field( 'form-verification', '_nonce_field', true, false );
		}
		$output .= '<input class="o-anti-bot" type="checkbox">';
		$output .= '</div>';
		return $output;
	}
}