HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: //proc/self/cwd/wp-content/themes/xts-luman/framework/includes/widgets/class-html-block.php
<?php
/**
 * Widget_Search class.
 *
 * @package xts
 */

namespace XTS\Widget;

use XTS\Widget_Base;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Direct access not allowed.
}

/**
 * AJAX search widget
 */
class Html_Block extends Widget_Base {
	/**
	 * Constructor.
	 */
	public function __construct() {
		$args = array(
			'label'       => esc_html__( '[XTemos] HTML Block', 'xts-theme' ),
			'description' => esc_html__( 'Display HTML Block', 'xts-theme' ),
			'slug'        => 'xts-widget-html-block',
			'fields'      => array(
				array(
					'id'      => 'id',
					'type'    => 'dropdown',
					'heading' => esc_html__( 'Select block', 'xts-theme' ),
					'value'   => xts_get_html_blocks_array( 'widget' ),
					'default' => '',
				),
			),
		);

		$this->create_widget( $args );
	}

	/**
	 * Output widget.
	 *
	 * @param array $args     Arguments.
	 * @param array $instance Widget instance.
	 */
	public function widget( $args, $instance ) {
		if ( $this->is_widget_preview() ) {
			return;
		}

		echo wp_kses( $args['before_widget'], 'xts_widget' );

		$default_args = array(
			'id' => '',
		);

		$instance = wp_parse_args( $instance, $default_args );

		echo xts_get_html_block_content( $instance['id'] ); // phpcs:ignore

		echo wp_kses( $args['after_widget'], 'xts_widget' );
	}
}