HEX
Server: Apache
System: Linux web5.visualcom.es 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: ensaco.es (10019)
PHP: 8.3.32
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/ensaco.es/httpdocs/wp-content/plugins/bb-plugin/blocks/test-block/test-block.php
<?php

FLBlock::register( 'test-block', [
	'name'        => __( 'Test', 'fl-builder' ),
	'description' => __( 'Test block for next-gen module rendering.', 'fl-builder' ),
	'category'    => __( 'Basic', 'fl-builder' ),
	'icon'        => 'layout.svg',
	'url'         => FL_BUILDER_URL . 'blocks/test-block/',
	'dir'         => FL_BUILDER_DIR . 'blocks/test-block/',
	'form'        => [
		'content' => [
			'title'    => __( 'Content', 'fl-builder' ),
			'sections' => [
				'general' => [
					'title'  => '',
					'fields' => [
						'content' => [
							'type'    => 'textarea',
							'label'   => __( 'Content', 'fl-builder' ),
							'preview' => array(
								'type'     => 'text',
								'selector' => '{node}.fl-test-block-content',
							),
						],
						'color'   => [
							'type'       => 'color',
							'label'      => __( 'Color', 'fl-builder' ),
							'show_reset' => true,
							'show_alpha' => true,
							'preview'    => array(
								'type'     => 'css',
								'selector' => '{node}',
								'property' => 'color',
							),
						],
					],
				],
			],
		],
	],
] );