WP_Widget_Custom_HTML::__construct()publicWP 4.8.1

Sets up a new Custom HTML widget instance.

Method of the class: WP_Widget_Custom_HTML{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Widget_Custom_HTML = new WP_Widget_Custom_HTML();
$WP_Widget_Custom_HTML->__construct();

Changelog

Since 4.8.1 Introduced.

WP_Widget_Custom_HTML::__construct() code WP 6.5.2

public function __construct() {
	$widget_ops  = array(
		'classname'                   => 'widget_custom_html',
		'description'                 => __( 'Arbitrary HTML code.' ),
		'customize_selective_refresh' => true,
		'show_instance_in_rest'       => true,
	);
	$control_ops = array(
		'width'  => 400,
		'height' => 350,
	);
	parent::__construct( 'custom_html', __( 'Custom HTML' ), $widget_ops, $control_ops );
}