<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

class IDVE_Block_HTML {

    public static function register( IDVE_Blocks $registry ) {
        $registry->register( 'html', array(
            'label'    => __( 'Custom HTML', 'insight-dezign-visual-editor' ),
            'icon'     => 'editor-code',
            'category' => 'content',
            'fields'   => array(
                'content' => array( 'type' => 'textarea', 'label' => __( 'HTML Code', 'insight-dezign-visual-editor' ), 'default' => '' ),
            ),
            'render' => array( __CLASS__, 'render' ),
        ) );
    }

    public static function render( $data, $settings ) {
        $content = isset( $data['content'] ) ? $data['content'] : '';
        return wp_kses_post( $content );
    }
}
